请帮我看看,curl获取不了内容
<br />$url="https://sellercentral.amazon.co.jp/hz/fba/profitabilitycalculator/productmatches?searchKey=B00F9520K4&language=ja_JP&profitcalcToken=OU5j2BenHp1umrO6zigDVeiYOYwdAj3D";<br /><br />$ch = curl_init(); <br />curl_setopt($ch, CURLOPT_URL, $rul); <br />curl_setopt($ch, CURLOPT_RETURNTRANSFER, true) ; <br />curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);<br />curl_setopt($ch, CURLOPT_HEADER, 0); <br />curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);<br />echo $output = curl_exec($ch) ; <br />
我直接访问链接是可以得到信息的,用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过期了。
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn