$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url.'me/accounts?type=pages&access_token='.$access_token);
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
$out = curl_exec($curl);
var_dump($out);