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:
luckyjay 2016-01-10 01:09:57 -05:00
parent 6fefefdfb5
commit fd553e72ea

View File

@ -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);