forked from La_Bureautique/zeg1jeux
arrange
This commit is contained in:
parent
baf37c70b9
commit
e25914e36b
|
@ -138,28 +138,9 @@ class Fred {
|
||||||
|
|
||||||
$url = $matches[1];
|
$url = $matches[1];
|
||||||
|
|
||||||
// die('<pre>' . var_dump($url, true) . '</pre>');
|
sleep($this->gatewayDelay);
|
||||||
|
|
||||||
$opts2 = array(
|
$page2 = file_get_contents($url);
|
||||||
'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);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($page2)) {
|
if (empty($page2)) {
|
||||||
|
|
||||||
|
@ -171,5 +152,5 @@ class Fred {
|
||||||
$gchangeId = $matches[1];
|
$gchangeId = $matches[1];
|
||||||
|
|
||||||
return $gchangeId;
|
return $gchangeId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue