X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=2154c063ad4b9e1449005966b5e1875494718031;hb=5d48d5d06e5d38933c3415890d692d4b23febe06;hp=d88f471c80512583601b1d7b711ff2158ca19314;hpb=002ef0e5c8ed2bab38e205a5d54617780f25c3a9;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index d88f471c..2154c063 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(),''); } @@ -2440,4 +2440,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 +?>