Beiträge von Laser32

    Hallo ihr lieben

    Ich habe eine Website indem ich ein Widget erstellt habe. Da man mir sagte das der Code den ich habe php ist habe ich mir erstmal ein php widget plgin runter geladen und installiert.

    dann habe ich das widget erstellt ,ihm einen Namen gegeben und dann den code rein kopiert.


    <div style="position: relative; top: -17px">
    <center><a href=http://steamcommunity.com/groups/schlachtfestchen target="_blank"><img src=http://schlachtfestchen.de/wordpress/wp-c…amcommunity.png></center></a>
    <?php
    $path = "cache/steamgroup.txt";


    if (!function_exists("CallAPI"))
    {
    function CallAPI($url)
    {
    $curl = curl_init();

    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
    curl_setopt($curl, CURLOPT_TIMEOUT, 3);
    curl_setopt($curl, CURLOPT_HEADER, 0);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_USERAGENT, "SmacStats");

    $data = curl_exec($curl);
    curl_close($curl);

    return $data;
    }
    }

    if (!file_exists($path) || (time() - filemtime($path)) > 600)
    {
    try
    {
    $xml = simplexml_load_string(CallAPI("http://steamcommunity.com/groups/schlach…slistxml/?xml=1"));

    if ($xml)
    {
    $string = $string.'
    <div class="membercounts">
    <div class="membercount members">
    <a href="http://steamcommunity.com/groups/schlachtfestchen#members">
    <span class="count " style="color: #333333">'.$xml->groupDetails->memberCount.'</span>
    <br>
    <span class="label" style="color: #333333">MITGLIEDER</span>
    </a>
    </div>
    <div>
    <center>
    <strong>
    <span style="color: #333333">'.$xml->groupDetails->memberCount.'</span>
    <br>
    <span style="color: #333333">Members</span>
    </strong>
    <br>
    ';


    <div class="membercount ingame">
    <div class="count ">258</div>
    <div class="label">IM SPIEL</div>
    </div>


    <div style="clear: left;"></div>
    </div>


    ';
    $string = $string.'
    <div class="membercount online">
    <div class="count ">'.$xml->groupDetails->membersOnline.'</div>
    <div class="label">Online</div>
    </div>(<font color="royalblue">'.$xml->groupDetails->membersOnline.' Online </font><font color="green">'.$xml->groupDetails->membersInGame.' In-Game</font>)</center></strong></div>';

    $file = fopen($path, 'wb');
    fwrite($file, $string);
    fclose($file);
    }
    }
    catch (Exception $e) {}
    }

    if (file_exists($path))
    echo file_get_contents($path);
    else
    echo '<br><b><span>Couldn\'t load Steam Group</span></b>';
    ?>
    </div>


    was mache ich falsch....