utils_geturl() follows redirects (fixes issue #36)

This commit is contained in:
azett 2019-02-13 17:06:56 +01:00
parent 7f2db6d23d
commit 1ec8be2cfe

View File

@ -384,12 +384,12 @@ function utils_geturl($url) {
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => false, // don't return headers
CURLOPT_FOLLOWLOCATION => false, // don't follow redirects
CURLOPT_ENCODING => "", // handle all encodings
CURLOPT_USERAGENT => "spider", // who am i
CURLOPT_AUTOREFERER => true, // set referer on redirect
CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect
CURLOPT_TIMEOUT => 120, // timeout on response
CURLOPT_FOLLOWLOCATION => true, // follow redirects
CURLOPT_MAXREDIRS => 10 // stop after 10 redirects
);