Http://mmbiz.qpic.cn/mmbiz/K6icFiaUPUZPxwORf6Eg7p9bgqVLWFyvEupNTTxhCgN ...
Like the picture above, using curl to get it becomes
Try to add user-agent and other information or not.
Reply content:
Http://mmbiz.qpic.cn/mmbiz/K6icFiaUPUZPxwORf6Eg7p9bgqVLWFyvEupNTTxhCgN ...
Like the picture above, using curl to get it becomes
Try to add user-agent and other information or not.
Maybe the resource server uses hotlinking technology, something like a Java filter
filter.
Determines whether hotlinking is based on information such as the requested browser type.
Is the normal return, other requests are returned directly to the hotlinking diagram.
The answer in the comments
' User-agent ' = ' mozilla/5.0 (Windows NT 6.3; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/41.0.2272.89 safari/537.36 ',
$url = ' Http://mmbiz.qpic.cn/mmbiz/K6icFiaUPUZPxwORf6Eg7p9bgqVLWFyvEupNTTxhCgN ... ';
$ch = Curl_init ();
$httpheader = Array (
' Host ' = ' mmbiz.qpic.cn ',
' Connection ' = ' keep-alive ',
' Pragma ' = ' no-cache ',
' Cache-control ' = ' no-cache ',
' Accept ' = ' text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/; q=0.8 ',
' User-agent ' = ' mozilla/5.0 (Windows NT 6.3; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/41.0.2272.89 safari/537.36 ',
' accept-encoding ' = ' gzip, deflate, SDCH ',
' Accept-language ' = ' zh-cn,zh;q=0.8,en;q=0.6,zh-tw;q=0.4 '
);
$options = Array (
Curlopt_httpheader = $httpheader,
Curlopt_url = $url,
Curlopt_timeout = 5,
Curlopt_followlocation = 1,
Curlopt_returntransfer = True
);
Curl_setopt_array ($ch, $options);
$result = curl_exec ($ch);
Curl_close ($ch);
File_put_contents ('./i.jpg ', $result);
This should be related to refer, the page refers to the refer relative to the other site, but the refer is empty case is can open the link, the landlord can copy the picture address to a new tab open try
Adsfasdfasd