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 committed 2016-01-10 01:09:57 -05:00
1 parent 6fefefdfb5
commit fd553e72ea
1 file changed
+1 -1
+1 -1
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);