X-Git-Url: https://git.ao2.it/tweeper.git/blobdiff_plain/3e82c7699c0cf07313fe1ae7d5c5de18b13da470..8da94863a9efd3a52978f14b3b4603f376665ea7:/tweeper.php?ds=sidebyside diff --git a/tweeper.php b/tweeper.php index 14c3a7a..923b303 100644 --- a/tweeper.php +++ b/tweeper.php @@ -51,12 +51,13 @@ class Tweeper { { $ch = curl_init($url); curl_setopt_array($ch, array( - CURLOPT_HEADER => FALSE, - CURLOPT_RETURNTRANSFER => TRUE, - CURLOPT_SSL_VERIFYHOST => FALSE, - CURLOPT_SSL_VERIFYPEER => FALSE, - CURLOPT_HTTPHEADER => array('Accept-language: en'), - CURLOPT_USERAGENT => Tweeper::$USER_AGENT, + CURLOPT_HEADER => FALSE, + CURLOPT_FOLLOWLOCATION => TRUE, // follow http redirects to get the real URL + CURLOPT_RETURNTRANSFER => TRUE, + CURLOPT_SSL_VERIFYHOST => FALSE, + CURLOPT_SSL_VERIFYPEER => FALSE, + CURLOPT_HTTPHEADER => array('Accept-language: en'), + CURLOPT_USERAGENT => Tweeper::$USER_AGENT, )); $contents = curl_exec($ch); curl_close($ch); @@ -68,13 +69,13 @@ class Tweeper { { $ch = curl_init($url); curl_setopt_array($ch, array( - CURLOPT_HEADER => TRUE, - CURLOPT_NOBODY => TRUE, - CURLOPT_FOLLOWLOCATION => TRUE, // follow http redirects to get the real URL - CURLOPT_RETURNTRANSFER => TRUE, - CURLOPT_SSL_VERIFYHOST => FALSE, - CURLOPT_SSL_VERIFYPEER => FALSE, - CURLOPT_USERAGENT => Tweeper::$USER_AGENT, + CURLOPT_HEADER => TRUE, + CURLOPT_NOBODY => TRUE, + CURLOPT_FOLLOWLOCATION => TRUE, // follow http redirects to get the real URL + CURLOPT_RETURNTRANSFER => TRUE, + CURLOPT_SSL_VERIFYHOST => FALSE, + CURLOPT_SSL_VERIFYPEER => FALSE, + CURLOPT_USERAGENT => Tweeper::$USER_AGENT, )); curl_exec($ch); $url_info = curl_getinfo($ch);