我想从网址获取图片。 当我执行url https://www.bing.com/hpwp/5c1d8376b1924366050f7acc7c653dad
时返回下载文件。
我问的是,我可以在不下载的情况下显示该网址的图片吗?
我也尝试使用此CURL
$curl_handle=curl_init();
curl_setopt($curl_handle, CURLOPT_URL, $url_bing_image_hd);
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($curl_handle, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl_handle, CURLOPT_USERAGENT, 'Google Chrome');
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, ['Content-type: image/jpeg', 'Content-Disposition: inline']);
$response = curl_exec($curl_handle);
$err = curl_error($curl_handle);
curl_close($curl_handle);
但它不起作用。 感谢您的帮助:))