Mmbiz. qpic. cnmmbizK6icFiaUPUZPxwORf6Eg7p9bgqVLWFyvEupNTTxhCgN... as shown in the figure above, it turns to the attempt to Add USER-AGENT and other information.
Http://mmbiz.qpic.cn/mmbiz/K6icFiaUPUZPxwORf6Eg7p9bgqVLWFyvEupNTTxhCgN...
The image above is obtained with CURL and becomes
Try to Add USER-AGENT and other information.
Reply content:
Http://mmbiz.qpic.cn/mmbiz/K6icFiaUPUZPxwORf6Eg7p9bgqVLWFyvEupNTTxhCgN...
The image above is obtained with CURL and becomes
Try to Add USER-AGENT and other information.
Maybe the resource server uses the leeching technology, similar to javafilterFilters
Determine whether to steal links based on information such as the requested browser type.
If yes, the system returns a normal result, and other requests directly return the leeching diagram.
Get the answer in the comment
'User-agent' => 'mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/80 ',
$ Url = 'HTTP: // response ...';
$ Ch = curl_init ();
$ Httpheader = array (
'Host' => 'mmbiz .qpic.cn ',
'Connection' => 'keep-alive ',
'Pragm' => '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/80 ',
'Accept-encoding' => 'gzip, deflate, sdch ',
'Accept-color' => 'zh-CN, zh; q = 0.8, en; q = 0.6, zh-TW; q = 100'
);
$ 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 refer referenced in the webpage is equivalent to an external domain website, but this link can be opened if refer is empty, you can copy the image address to a new tab.
Adsfasdfasd