Ich hab nen kleines Problemchen bei dem ich etwas Hilfe brauche.
Vieleicht erbarmt sich jemand meiner
Ich habe mir dieses Modul herunter geladen.
Es ist dort ausdrücklich erwähnt, das CURL Installiert sein muss!
Nur weiß ich nicht ob dies auch so ist...aus der info php werd ich net schlau
---> Hier gehts zur infophp.php
Kann mir jemand bitte sagen ob CURL Installiert ist...und falls nicht, wie Installiere ich das bzw wo bekomme ich das her ?
Mfg N0Name
verwendete ilchClan Version: 1.1 N
betroffene Homepage: ghmclan.bplaced.net/index.php?
Edit*
CURL is bei bplaced wohl nicht verfügbar...na toll :'(
Doch weiter gehts...
Dieses CURL Zeugs stand ab Zeile 62 drin...laut dem Battletracker-Forum sollte ich das alles rauschmeisen und die XML dort einfügen.
Hab ich auch gemacht...jedoch sagt er mir jetzt immer "keine Daten oder offline" !
Folge ich aber den angegebenen XML-Link sind dort Daten vorhanden.??!!
Hier mal die PHP...
<?php /* *********************************** * Copyright (c) 2006, honklords.de* *********************************** */ defined ('main') or die ( 'no direct access' ); $title = $allgAr['=]GHM[='].' :: Americas Army Tracker'; $hmenu = '<a href="?aa_tracker">AAO-Tracker</a>'; $design = new design ( $title , $hmenu ); $design->header(); $clanid = "27845"; function startTag($parser, $name, $attrs) { global $stack; $tag=array("name"=>$name,"attrs"=>$attrs); array_push($stack,$tag); } function cdata($parser, $cdata) { global $stack; $stack[count($stack)-1]['cdata'] .= $cdata; } function endTag($parser, $name) { global $stack; $stack[count($stack)-2]['children'][] = $stack[count($stack)-1]; array_pop($stack); } function aSortBySecondIndex($multiArray, $secondIndex, $dir) { while (list($firstIndex, ) = each($multiArray)) $indexMap[$firstIndex] = $multiArray[$firstIndex][$secondIndex]; if ($dir==0) asort($indexMap); else arsort($indexMap); while (list($firstIndex, ) = each($indexMap)) if (is_numeric($firstIndex)) $sortedArray[] = $multiArray[$firstIndex]; else $sortedArray[$firstIndex] = $multiArray[$firstIndex]; return $sortedArray; } $stack = array(); $claninfo = array(); $clanstats = array(); $playerstats = array(); $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startTag", "endTag"); xml_set_character_data_handler($xml_parser, "cdata"); $xmllink="http://battletracker.com/clanfeed/aao/25756/claninfo.xml"; $data = xml_parse($xml_parser,$xmllink); for($i = 0; $i < sizeof($stack[0][children][0][children]); $i++) { $valname=$stack[0][children][0][children][$i][name]; $claninfo[$valname]=$stack[0][children][0][children][$i][cdata]; } for($i = 0; $i < sizeof($stack[0][children][1][children]); $i++) { $valname=$stack[0][children][1][children][$i][name]; $clanstats[$valname]=$stack[0][children][1][children][$i][cdata]; } // Get Data // Get Clan Profile Data $clan_count = $claninfo['CLANCOUNTRY']; $clan_honor = $clanstats['HONOR']; $clan_score = $clanstats['SCORE']; $clan_kills = $clanstats['KILLS']; $clan_deaths = $clanstats['DEATHS']; $clan_kdr = $clanstats['KDRATIO']; $clan_roe = $clanstats['ROE']; $clan_kdr = ($clan_kdr < 1) ? '<font color="#FF0000">'.$clan_kdr.'</font>' : '<font color="#00FF00">'.$clan_kdr.'</font>'; $clan_kdr = ($clan_kdr <= 2) ? '<font color="#0000FF">'.$clan_kdr.'</font>' : $clan_kdr; echo '<table width="100%" cellpadding="0" cellspacing="0"> <tr> <td><b>'.$title.'</b></td> </tr> </table>'; if ($clan_count == ""){ echo '<br><br><table width="100%" cellpadding="0" cellspacing="0"> <tr> <td align="center">keine Daten oder offline</td> </tr> </table>'; }else { echo '<table width="100%" cellpadding="0" cellspacing="0"> <tr> <td height="20"><br></td> </tr> </table>'; echo '<table width="180" cellpadding="2" cellspacing="1" border="0" class="border">'; echo '<tr class="Chead"><td colspan="2"><b>Clanstats:</b></td></tr>'; echo '<tr><td class="Cmite">Clancountry:</td> <td class="Cnorm" align="center"><img src="include/images/tracker/flags/'.$clan_count.'.jpg" width="16" height="12" border="0"></td></tr>'; echo '<tr><td class="Cmite">Durchschnitts Honor:</td> <td class="Cnorm" align="right">'.$clan_honor.'</td></tr>'; echo '<tr><td class="Cmite">Durchschnitts Score:</td> <td class="Cnorm" align="right">'.$clan_score.'</td></tr>'; echo '<tr><td class="Cmite">Durchschnitts Kills:</td> <td class="Cnorm" align="right">'.$clan_kills.'</td></tr>'; echo '<tr><td class="Cmite">Durchschnitts Deaths:</td> <td class="Cnorm" align="right">'.$clan_deaths.'</td></tr>'; echo '<tr><td class="Cmite">Durchschnitts K/D:</td> <td class="Cnorm" align="right">'.$clan_kdr.'</td></tr>'; echo '<tr><td class="Cmite">Durchschnitts ROE:</td> <td class="Cnorm" align="right">'.$clan_roe.'</td></tr>'; echo '</table>'; // Get Player Data for($i = 0; $i < sizeof($stack[0][children][2][children]); $i++) { for($x = 0; $x < sizeof($stack[0][children][2][children][$i][children]); $x++) { $valname=$stack[0][children][2][children][$i][children][$x][name]; $value=$stack[0][children][2][children][$i][children][$x][cdata]; if($valname=="PLAYERID") $pid=$value; $playerstats[$pid][$valname]=$value;} $playerstats[$pid][PLAYERFRAG]=@round($playerstats[$pid][PLAYERKILLS]/$playerstats[$pid][PLAYERDEATHS],2); } echo '<table width=100% cellpadding=0 cellspacing=0> <tr> <td height="20"><br></td> </tr> </table>'; echo '<table width="100%" cellpadding="2" cellspacing="1" class="border">'; echo '<tr class="Chead"><td colspan="10"><b>Playerstats:</b></td></tr>'; echo '<tr class="Cmite">'; echo '<td align="center"><b>Player</b></td>'; echo '<td align="center"><b>Honor</b></td>'; echo '<td align="center"><b>Kills</b></td>'; echo '<td align="center"><b>Deaths</b></td>'; echo '<td align="center"><b>K/D</b></td>'; echo '<td align="center"><b>Score</b></td>'; echo '<td align="center"><b>Leader</b></td>'; echo '<td align="center"><b>Goals</b></td>'; echo '<td align="center"><b>HR</b></td>'; echo '<td align="center"><b>Status</b></td></tr>'; switch ($sort) { case 1: $playerstats_sorted=aSortBySecondIndex($playerstats, 'PLAYERSTATUS', $dir); break; case 2: $playerstats_sorted=aSortBySecondIndex($playerstats, 'PLAYERNAME', $dir); break; case 3: $playerstats_sorted=aSortBySecondIndex($playerstats, 'PLAYERHONOR', $dir); break; case 4: $playerstats_sorted=aSortBySecondIndex($playerstats, 'PLAYERSCORE', $dir); break; case 5: $playerstats_sorted=aSortBySecondIndex($playerstats, 'PLAYERKILLS', $dir); break; case 6: $playerstats_sorted=aSortBySecondIndex($playerstats, 'PLAYERDEATHS', $dir); break; case 7: $playerstats_sorted=aSortBySecondIndex($playerstats, 'PLAYERFRAG', $dir); break; case 8: $playerstats_sorted=aSortBySecondIndex($playerstats, 'PLAYERTIME', $dir); break; default: $playerstats_sorted=aSortBySecondIndex($playerstats, 'PLAYERHONOR', 1); } foreach($playerstats_sorted as $key => $value) { $playername=$playerstats_sorted[$key][PLAYERNAME]; $playerhonor=$playerstats_sorted[$key][PLAYERHONOR]; $playerurl=$playerstats_sorted[$key][PLAYERSTATSURL]; $playerkills=$playerstats_sorted[$key][PLAYERKILLS]; $playerdeaths=$playerstats_sorted[$key][PLAYERDEATHS]; $playerkdr = $playerstats_sorted[$key][PLAYERFRAG]; $playerscore=$playerstats_sorted[$key][PLAYERSCORE]; $playerlscore=$playerstats_sorted[$key][PLAYERLEADERSCORE]; $playergscore=$playerstats_sorted[$key][PLAYERGOALSCORE]; $playertime=floor(($playerstats_sorted[$key][PLAYERTIME])/60/60); $status = ($playerstats_sorted[$key]['PLAYERSTATUS']=="1") ? '<img src="include/images/tracker/online.gif" alt="online" />' : '<img src="include/images/tracker/offline.gif" alt="offline" />'; $playerkdr = ($playerkdr < 1) ? '<font color="#FF0000">'.$playerkdr.'</font>' : '<font color="#00FF00">'.$playerkdr.'</font>'; $playerkdr = ($playerkdr <= 2) ? '<font color="#0000FF">'.$playerkdr.'</font>' : $playerkdr; echo '<tr class="Cnorm">'; echo '<td align="left"><a href="'.$playerurl.'" target="_blank">'.$playername.'</a></td>'; echo '<td align="center">'.$playerhonor.'</td>'; echo '<td align="center">'.$playerkills.'</td>'; echo '<td align="center">'.$playerdeaths.'</td>'; echo '<td align="center">'.$playerkdr.'</td>'; echo '<td align="center">'.$playerscore.'</td>'; echo '<td align="center">'.$playerlscore.'</td>'; echo '<td align="center">'.$playergscore.'</td>'; echo '<td align="right">'.$playertime.'</td>'; echo '<td align="right">'.$status.'</td>'; echo '</tr>'; } echo '</table>'; echo '<table width=100% cellpadding=0 cellspacing=0> <tr> <td align="center"><br><b>K/D</b> = Fragrate (K/D Ratio) || <b>HR</b> = Total time played<br>Click the player name to get more detailed stats @ aaotracker.com</td> </tr> </table>'; } $design->footer(); ?>
Zuletzt modifiziert von N0Name am 05.08.2010 - 20:18:20