1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  1. Elaar

    Elaar Naked Wanderer

    This Script works Great but, it Reduce the Loading Time of the Website. Is Anyone her who can update this Script to Ajax for Async support for better loading times?

    This Script Example was made 2014 from Lordicon, It Works with all Listforge listed Games.
    for Other Games, Change the ApiLink and The Api Key!

    Server Status (7dtd)
    Code (Text):
    ini_set('user_agent', 'PHP');
    $json = file_get_contents("http://7daystodie-servers.com/api/?object=servers&element=detail&key=YOUR_API_KEY_HERE");
    $data = json_decode($json);
    echo "<b>Address:</b>&nbsp;".$data->address.":".$data->port."<br /><b>Status:</b>&nbsp;";
    $online = $data->is_online;
    if ($online =="1"){
        echo"<img src=\"http://www.thedecoy.net/images/online.png\" alt=\"Online\">";
        echo"<img src=\"http://www.thedecoy.net/images/offline.png\" alt=\"Offline\">";
    echo"<br /><b>Players:</b>&nbsp;".$data->players."/".$data->maxplayers."<br /><b>Uptime:</b>&nbsp;".$data->uptime."%<br /><b>Version:</b>&nbsp;".$data->version."<br />";
    Voting (7dtd)
    Code (Text):
    $json2 = file_get_contents("http://7daystodie-servers.com/api/?object=servers&element=voters&key=YOUR_API_KEY_HERE&month=current&limit=10&format=json");
    $data2 = json_decode($json2,true);
    echo '<table>';
    foreach ($users as $user){
        echo "<tr><td>".$user['nickname']."</td><td>&nbsp;</td><td> ".$user['votes']." votes</td></tr>";
    echo '</table>';
  2. sami37

    sami37 Plugin Developer

    Hello, did you try cURL and/or jquery?
  3. Elaar

    Elaar Naked Wanderer

    iam self cant programming and need help for that!