<?php function curl($mail){
$go = curl_init();
$access_token = '1234567890|5fabcd37ef194fee-1752237355|JrG_CsXLkjhcQ_LeYPU.';
curl_setopt($go, CURLOPT_URL,'https://graph.facebook.com/search?q='.$mail.'&type=user&access_token='.$access_token);
curl_setopt($go, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8");
curl_setopt($go, CURLOPT_POST, 0);
curl_setopt($go, CURLOPT_HEADER, 0);
curl_setopt($go, CURLOPT_RETURNTRANSFER, true);
curl_setopt($go, CURLOPT_SSL_VERIFYPEER, false);
$json = curl_exec($go);
curl_close($go);
$arr = json_decode($json,1);
if(isset($arr['data']['0']['id'])) {
return $arr['data']['0']['id'];
} else {
return false;
}
} ?>
Birazdan ben çalıştırdıktan sonra return $arr['data']['0']['id'];
Ancak ben $name
değişkeni echo olamaz $a = curl($mail);
Yukarıda $name = $arr['data']['0']['name'];
yatıracağım