live scores

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    live scores

    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

    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&amp;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($fp4096);
    fclose($fp);
    if( 
    eregi("<item>(.*)</item>"$raw$rawitems ) ) {
    $items explode("<item>"$rawitems[0]);

      
    $p 50;
      if (
    $npage == "")$npage "1";
      
    $countfilecount($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("& ""&amp;"$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).'"&amp;sid=$sid>Prev</a> ';
    if (
    $npages and $npage<$npages$gline_next ' <a href="'.$_SERVER["PHP_SELF"].'?npage='.($npage+1).'"&amp;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>
    is there something that needs to go in the database or something missing to get these scores working?

    #2
    <?php
    echo '<meta http-equiv=Refresh content="0;url=index.php?reload=1">';
    ?>

    Set content to wateva yu want, content="1" equals 1 sec

    Comment


      #3
      im wanting live scores to show up not the refresh

      Comment


        #4
        ........

        i am not sure if its working or not but still chk it out.

        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&amp;sid=$sid\">";


          
        $main.= "<p align=\"center\">";
        $main.="Scores refresh every 2 mins<br/><br/>";
        $feed "http://www.scorespro.com/rss/live-soccer.xml";
        $fp = @fopen($feed,"r");
        while(!
        feof($fp)) $raw .= @fgets($fp4096);
        fclose($fp);
        if( 
        eregi("<item>(.*)</item>"$raw$rawitems ) ) {
        $items explode("<item>"$rawitems[0]);

          
        $p 50;
          if (
        $npage == "")$npage "1";
          
        $countfilecount($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("& ""&amp;"$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).'"&amp;sid=$sid>Prev</a> ';
        if (
        $npages and $npage<$npages$gline_next ' <a href="'.$_SERVER["PHP_SELF"].'?npage='.($npage+1).'"&amp;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>
        i am not sure if its working or not but still chk it out.

        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&amp;sid=$sid\">";


          
        $main.= "<p align=\"center\">";
        $main.="Scores refresh every 2 mins<br/><br/>";
        $feed "http://www.scorespro.com/rss/live-soccer.xml";
        $fp = @fopen($feed,"r");
        while(!
        feof($fp)) $raw .= @fgets($fp4096);
        fclose($fp);
        if( 
        eregi("<item>(.*)</item>"$raw$rawitems ) ) {
        $items explode("<item>"$rawitems[0]);

          
        $p 50;
          if (
        $npage == "")$npage "1";
          
        $countfilecount($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("& ""&amp;"$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).'"&amp;sid=$sid>Prev</a> ';
        if (
        $npages and $npage<$npages$gline_next ' <a href="'.$_SERVER["PHP_SELF"].'?npage='.($npage+1).'"&amp;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


          #5
          eregi is out of date function

          Use

          preg_match
          Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
          Visit: WapMasterz Coming Back Soon!
          _______
          SCRIPTS FOR SALE BY SUBZERO
          Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
          FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
          _______
          Info & Tips
          php.net
          w3schools.com

          Comment


            #6
            is this correct subzero

            Originally posted by subzero View Post
            eregi is out of date function

            Use

            preg_match
            so i need to change

            if( eregi("<item>(.*)</item>", $raw, $rawitems ) ) {
            $items = explode("<item>", $rawitems[0]);

            to

            if( preg_match("<item(.*)</item>", $raw, $rawitems ) ) {
            $items = explode("<item>", $rawitems[0]);
            Last edited by Kirsty; 05.03.11, 17:48. Reason: wrong symbol

            Comment


              #7
              PHP Code:
              if(preg_match("/<item(.*)</item>/i"$raw$rawitems ) ) {
              $items explode("<item>"$rawitems[0]); 
              Need /
              Last edited by arnage; 05.03.11, 21:41. Reason: insensetive
              <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

              Comment


                #8
                Originally posted by arnage View Post
                PHP Code:
                if(preg_match("/<item(.*)</item>/i"$raw$rawitems ) ) {
                $items explode("<item>"$rawitems[0]); 
                Need /

                i tried

                if(preg_match("/<item(.*)</item>/i", $raw, $rawitems ) ) {
                $items = explode("<item>", $rawitems[0]);

                and

                if( preg_match("<item(.*)</item>", $raw, $rawitems ) ) {
                $items = explode("<item>", $rawitems[0]);

                but they just bring up errors

                i tried messing around with it to get it to work but no joy, does anyone have a working scores.php please

                Comment


                  #9
                  Sample

                  Code:
                  if (preg_match('/.jpg/i', $file))
                  PHP Code:
                  if (preg_match("/<item(.*)</item>/i"$raw$rawitems ) )) {
                  $items explode("<item>"$rawitems[0]); 
                  Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                  Visit: WapMasterz Coming Back Soon!
                  _______
                  SCRIPTS FOR SALE BY SUBZERO
                  Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                  FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                  _______
                  Info & Tips
                  php.net
                  w3schools.com

                  Comment


                    #10
                    Originally posted by subzero View Post
                    Sample

                    Code:
                    if (preg_match('/.jpg/i', $file))
                    PHP Code:
                    if (preg_match("/<item(.*)</item>/i"$raw$rawitems ) )) {
                    $items explode("<item>"$rawitems[0]); 
                    so i need to put if (preg_match('/.jpg/i', $file)) in the script with if (preg_match("/<item(.*)</item>/i", $raw, $rawitems ) )) {
                    $items = explode("<item>", $rawitems[0]);

                    Comment


                      #11
                      No that is only a sample lol
                      Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                      Visit: WapMasterz Coming Back Soon!
                      _______
                      SCRIPTS FOR SALE BY SUBZERO
                      Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                      FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                      _______
                      Info & Tips
                      php.net
                      w3schools.com

                      Comment

                      Working...
                      X