我有以下代码:
$handle=curl_init('https://graph.facebook.com/me?access_token=***');
curl_setopt($handle, CURLOPT_VERBOSE, true);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
$content = curl_exec($handle);
echo $content;
它什么也没返回,我认为问题是因为 https 因为当我更改为带有 http 的链接时它可以工作。但是当我使用https://www.google.com/作为链接时它仍然有效,所以我不确定问题是什么,但我认为 facebook 阻止了某些东西..
请帮忙 ?我尝试检查是否有错误,但它没有给我任何错误,当我检查时(我认为 print_r)它给了我这个:
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 1.9E-5
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
请帮忙 !我到处搜索,没有任何帮助..