請幫我看看,curl擷取不了內容
$url="https://sellercentral.amazon.co.jp/hz/fba/profitabilitycalculator/productmatches?searchKey=B00F9520K4&language=ja_JP&profitcalcToken=OU5j2BenHp1umrO6zigDVeiYOYwdAj3D";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $rul);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true) ;
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
echo $output = curl_exec($ch) ;
我直接存取連結是可以得到資訊的,用curl擷取就擷取不了。請問哪裡設定不對??
------解決思路----------------------
curl_getinfo();
Array
(
[url] => https://sellercentral.amazon.co.jp/hz/fba/profitabilitycalculator/productmatches?searchKey=B00F9520K4&language=ja_JP&profitcalcToken=OU5j2BenHp1umrO6zigDVeiYOYwdAj3D
[content_type] => text/html;charset=UTF-8
[http_code] => 500
[header_size] => 525
[request_size] => 311
[filetime] => -1
[ssl_verify_result] => 20
[redirect_count] => 0
[total_time] => 0.953
[namelookup_time] => 0
[connect_time] => 0.218
[pretransfer_time] => 0.671
[size_upload] => 0
[size_download] => 2252
[speed_download] => 2363
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => 0
[starttransfer_time] => 0.953
[redirect_time] => 0
[certinfo] => Array
(
)
[primary_ip] => 54.240.252.167
[primary_port] => 443
[local_ip] => 192.168.1.5
[local_port] => 1913
[redirect_url] =>
)
估計你token到期了。