diff --git a/lib/Fred.class.php b/lib/Fred.class.php index 01dd588..60ca291 100644 --- a/lib/Fred.class.php +++ b/lib/Fred.class.php @@ -138,28 +138,9 @@ class Fred { $url = $matches[1]; - // die('
' . var_dump($url, true) . '
'); + sleep($this->gatewayDelay); - $opts2 = array( - 'http'=>array( - 'method'=>"GET", - 'header'=>"Accept-language: fr\r\n", - 'follow_location' => 0 - ) - ); - - $context2 = stream_context_create($opts2); - - $page2 = ''; - - $rounds = 0; - - while (empty($page2) and $rounds < 10) { - - sleep($this->gatewayDelay); - - $page2 = file_get_contents($url, false, $context2); - } + $page2 = file_get_contents($url); if (empty($page2)) { @@ -171,5 +152,5 @@ class Fred { $gchangeId = $matches[1]; return $gchangeId; - } + } }