954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to fetch cricket scorecard to mysql database automatically for customization.

how to fetch cricket scorecard to mysql database automatically for customization.
i m planning to develop a game based on cricket.
actually i am using php mysql database for it. i want complete cricket scorecard to mysql database automatically for customization.

I m using snoopy class for content fetching from live scorecard site, however, there seems to be some techinical limitation in snoopy. It fetches the scorecard from given website but I want to save data in database and snoopy picks up the data character wise, however, the payer names keep changing

I want to fetch player name, how he got out and his runs including 4s and 6s

Please help me out. IPL is approching.......

upendrau
Newbie Poster
1 post since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

Then you'll want to look into using something like cURL and/or Snoopy to extract the data from the live site. You could probably do it with just cURL and some regex patterns if the data is easy to locate in the page structure.

harry arora
Newbie Poster
3 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

try dis ,if it works let me know.....

<?php

if (eregi("block-Cricket_Feed.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}


$content  = "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"#9BBBDA\"><tr><td>\n";
$content .= "<center><font class=\"option\"><b> Cricket</b></font></center><SCRIPT TYPE=\"text/javascript\">\n";
$content .= "<!--//\n";
$content .= "function refimage(){\n";
$content .= "   var swad=document.getElementById('swad');\n";
$content .= "   dum=Math.random();\n";
$content .= "   swad.src='extra/cric_score_image.php?'+dum;\n";
$content .= "}\n";
$content .= "setInterval('refimage()', 60000);\n";
$content .= "//-->\n";
$content .= "\n";
$content .= "</SCRIPT>\n";
$content .= "<div align=\"center\"><img name=\"swan\" id=\"swad\" src=\"http://www.ananmanan.com/extra/cric_score_image.php\" alt=\"Live Cricket Scores\"></div></td></tr></table></td></tr></table>\n";


?>
harry arora
Newbie Poster
3 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You