$curl_handle=curl_init();
curl_setopt($curl_handle, CURLOPT_URL,"https://www.facebook.com/feeds/page.php?format=atom10&id=111111111111111"); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,5);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl_handle, CURLOPT_USERAGENT, array('User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Safari/534.45'));
curl_setopt($curl_handle, CURLOPT_VERBOSE, true);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
if (empty($buffer))
{
print "Sorry, request failed.";
}
else
{
(do stuff with the feed)
}
I will update this posting as this project progresses.
No comments:
Post a Comment