Change curl opts to improve reachable test
isURLReachable would fail for certain sites, such as Amazon.com. Removing NOBODY and adding RETURNTRANSFER solved the issue for me.
This commit is contained in:
parent
6fefefdfb5
commit
fd553e72ea
@ -279,7 +279,7 @@ class http2pic
|
||||
function isURLReachable($url)
|
||||
{
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_exec($ch);
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user