can anyone help me with live scores all that comes up is this page refreshes every 2mins the code i have for live scores is
is there something that needs to go in the database or something missing to get these scores working?
PHP Code:
<?php
define('WCS',true);
include('./core/main.inc');
header_type();
cleardata();
if(ipbanned(ip(),browser())){
if(!shield(getuid_sid($sid))){
echo head_tag("Ip Blocked!!!",0,0);
echo ipbanned_msg();
echo foot_tag();
exit();
}
}
if(!islogged($sid)){
echo head_tag("Error!!!",0,0);
echo session_expired();
echo foot_tag();
exit();
}
if(banned(getuid_sid($sid))){
echo head_tag("Error!!!",1,getnick_sid($sid));
echo banned_msg($sid);
echo foot_tag();
exit();
}
mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
////////////////////////////////////////MAIN PAGE
if($action=="main")
{
addonline(getuid_sid($sid),"Checking Footy Scores","");
$nick=getnick_sid($sid);
echo head_tag(getnick_sid($sid)."@Live Scores",1,getnick_sid($sid));
$title="<b>Live Football
Scores</b>";
echo "<meta http-equiv=\"refresh\" content=\"120; url=scores.php?action=main&sid=$sid\">";
$main.= "<p align=\"center\">";
$main.="Scores refresh every 2 mins<br/><br/>";
//$feed = "http://www.scorespro.com/rss/live-soccer.xml";
$feed = "http://www.soccerstand.com/rss/soccer/en/today";
$fp = @fopen($feed,"r");
while(!feof($fp)) $raw .= @fgets($fp, 4096);
fclose($fp);
if( eregi("<item>(.*)</item>", $raw, $rawitems ) ) {
$items = explode("<item>", $rawitems[0]);
$p = 50;
if ($npage == "")$npage = "1";
$countfile= count($items);
$countfile=$countfile-2;
$first=($npage*$p)-$p;
$npages = ceil($countfile / $p);
$items = array_reverse($items);
$next_arrays=($first+($p-1));
if($next_arrays>$countfile)$next_arrays=$countfile;
for ($i=($first); $i <= $next_arrays; $i++) {
eregi("<title>(.*)</title>",$items[$i+1], $title1 );
eregi("<link>(.*)</link>",$items[$i+1], $url );
eregi("<description>(.*)</description>",$items[$i+1], $description);
#$title1[1] = str_replace("'", "", $title1[1]);
$title1[1] = str_replace("& ", "&", $title1[1]);
$main.="<small>";
$main.= $title1[1].'<br/><br/>';
$main.="</small>";
}
}
if ($npage <= $npages and $npage>1) $gline_rew = '<a href="'.$_SERVER["PHP_SELF"].'?npage='.($npage-1).'"&sid=$sid>Prev</a> ';
if ($npages > 1 and $npage<$npages) $gline_next = ' <a href="'.$_SERVER["PHP_SELF"].'?npage='.($npage+1).'"&sid=$sid>Next</a>';
//$main.= "<br/>Page {$npage} of {$npages}<br/>".$gline_rew.$gline_next."<br/>";
$main.= "</p>";
$main.= "<p align=\"center\">";
$L1="$sixkey<a $key6 href=\"./inbox/inbox.php?sid=$sid\">Inbox</a>";
$L2="$sevenkey<a $key7 href=\"./buds/buds.php?sid=$sid\">BuddyList</a>";
$L3="$eightkey<a $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>";
$L4="$ninekey<a $key9 href=\"./forums/forums.php?sid=$sid\">Forums</a>";
$L5="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
else if($action=="admin")
{
addonline(getuid_sid($sid),"Requesting Admin","");
$nick=getnick_sid($sid);
echo head_tag(getnick_sid($sid)."@Requesting Admin",1,getnick_sid($sid));
$title="<b>Admin Request</b>";
$main.= "<p align=\"center\">";
$ownid[0]=1;
$who=$_GET["whoid"];
$whoid=$_GET["who"];
$message = $_POST["message"];
$message3 = "AUTOMATED PM[br/][br/]".$nick." has requested to be site admin, please contact them directly regarding this matter";
//mysql_query("INSERT INTO ibwf_private SET text='".$message3."', byuid='".$uid."', touid='".$ownid[0]."', unread='1', timesent='".time()."'");
autopm($message3, $ownid[0]);
$main.="<br/>You have requested an admin job, The site owner will contact you as soon as possible regarding your request<br/>";
$L1="$sixkey<a $key6 href=\"./inbox/inbox.php?sid=$sid\">Inbox</a>";
$L2="$sevenkey<a $key7 href=\"./buds/buds.php?sid=$sid\">BuddyList</a>";
$L3="$eightkey<a $key8 href=\"./chat/public.php?sid=$sid\">Chat</a>";
$L4="$ninekey<a $key9 href=\"./forums/forums.php?sid=$sid\">Forums</a>";
$L5="$zerokey<a $key0 href=\"./main.php?sid=$sid\"><img src=\"./images/home.gif\" alt=\"\"/>Main Menu</a>";
echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
echo foot_tag();
exit;
}
?>
</html>
Comment