Due to work requirements, I need to crawl data from other people’s websites. I use php+ curl but I have no solution to the problem
I heard that there are many gods in the mainland, please help me, from The boy from Taiwan has been reading articles for three days.
The website is as follows:
First enter:
http://www.cbssports.com/mlb/scoreboard
Then, select the event that is currently being played below and click GAMETRACKER You can watch the live broadcast
The question is coming
Take this URL as an example: (When you see it, maybe the game is over)
ttp://www.cbssports.com/mlb/gametracker/live/MLB_20140527_TB@TOR
The program written by my brother is as follows: $game=array();
$ch = curl_init();
$search1=$_GET['searcharg'];
$url="http://www.cbssports.com/mlb/gametracker/live/MLB_20140527_TB@TOR";
$cookie_jar =dirname(__FILE__)."/pic.cookie";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLO PT_USERAGENT,"Mozilla/ 5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko)Chrome/20.0.1132.57 Safari/536.11");
$data = curl_exec($ch);
curl_close($ch) ;
preg_match_all('/
….(Character String parsing)
Currently known issues:
Whether it is "save as new"save as or view Original file , some html that should appear have not appeared, for example:
The original website is:
img src="http://sports.cbsimg.net/images/baseball/mlb/players/60x80/1961062.jpg"border="0">
< td>Pitcher:M. Marriot | # 48 RP< ;/span>
>0.1IP td>
|