From fd553e72ea2e3d281151c2010f1c3d392a408417 Mon Sep 17 00:00:00 2001 From: luckyjay Date: Sun, 10 Jan 2016 01:09:57 -0500 Subject: [PATCH] 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. --- http2pic.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http2pic.class.php b/http2pic.class.php index 3954e9c..c4db38c 100644 --- a/http2pic.class.php +++ b/http2pic.class.php @@ -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);