X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=b402eba9b2f7f006441bd8b65bc19293bf778d70;hb=fdc3c114d1617578e388147af138e8470d7b20b3;hp=b65bfb7c9fc25772aa6dabeedf5a586f31473810;hpb=fc93ae1d1a661ff33d1f1ed1100ae09277a77456;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index b65bfb7c..b402eba9 100644 --- a/index.php +++ b/index.php @@ -566,7 +566,7 @@ function getHTTP($url,$timeout=30) { try { - $options = array('http'=>array('method'=>'GET','timeout' => $timeout)); // Force network timeout + $options = array('http'=>array('method'=>'GET','timeout' => $timeout, 'user_agent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0')); // Force network timeout $context = stream_context_create($options); $data=file_get_contents($url,false,$context,-1, 4000000); // We download at most 4 Mb from source. if (!$data) { return array('HTTP Error',array(),''); } @@ -2444,4 +2444,4 @@ if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=d if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'ws=')) { processWS(); exit; } // Webservices (for jQuery/jQueryUI) if (!isset($_SESSION['LINKS_PER_PAGE'])) $_SESSION['LINKS_PER_PAGE']=$GLOBALS['config']['LINKS_PER_PAGE']; renderPage(); -?> \ No newline at end of file +?>