29 lines
476 B
PHP
29 lines
476 B
PHP
<?php
|
|
// dans /var/www/w.lanisys.fr sur le serveur ionos
|
|
|
|
$ctx = stream_context_create([
|
|
'http' => [
|
|
'timeout' => 4,
|
|
],
|
|
]);
|
|
|
|
echo file_get_contents(
|
|
"https://api.lanisys.fr:50000/",
|
|
false,
|
|
$ctx
|
|
);
|
|
|
|
$rep = file_get_contents(
|
|
"https://api.lanisys.fr:50000/",
|
|
false,
|
|
$ctx
|
|
);
|
|
|
|
$pos = strpos($rep, "https://");
|
|
if ($pos !== false)
|
|
{
|
|
header("Location: ".substr($rep, $pos));
|
|
exit;
|
|
}
|
|
else
|
|
echo $rep; |