地狱之友
我需要从这里获取比赛结果
"http://www.drf.com/race-results/BHP/USA/2012-06-23/D"
并想存储在我的数据库中,我需要获取比赛 1、比赛 2、比赛 3 等的所有记录
请建议我使用此代码,但它向我显示整页我只需要特定信息
<?php
$ch = curl_init();
//Fetch the timeline
curl_setopt($ch, CURLOPT_URL, 'http://www.drf.com/race-results/BHP/USA/2012-06-24/D');
//send data via $_GET
//curl_setopt($ch, CURLOPT_GET, 0);
//do not return the header information
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
//If SSL verification is needed. Delete if not needed
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
//Give me the data back as a string... Don't echo it.
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Warp 9, Engage!
$content = curl_exec($ch);
//Close CURL connection & free the used memory.
curl_close($ch);
?>