This commit is contained in:
fred 2023-03-14 17:28:35 +01:00
parent baf37c70b9
commit e25914e36b
1 changed files with 3 additions and 22 deletions

View File

@ -138,28 +138,9 @@ class Fred {
$url = $matches[1];
// die('<pre>' . var_dump($url, true) . '</pre>');
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;
}
}
}