I am implementing facebook count function using cron file. In which cron runs every 10 minutes and counts the total likes of a page.
for($i=0;$i<3;$i++){
$source_url =$cars[$i];
$rest_url = "http://api.facebook.com/restserver.php?method=links.getStats&urls=".urlencode($source_url);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,$rest_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec($curl);
curl_close($curl);
$message=stripslashes($content);
$xml_record = simplexml_load_string($message);
$fb_like_count = $xml_record->link_stat->like_count;
echo "".$fb_like_count;
mail("abc@gmail.com","hi".$fb_like_count,$message);
}
But I am geting undefined call function error.
php-xml
module installed and enabled?