32 lines
892 B
PHP
32 lines
892 B
PHP
<?php
|
|
class Inventaire extends CI_Controller {
|
|
|
|
public function index()
|
|
{
|
|
$ci4_url = base_url('v4/dynamic/list/inventaire_test');
|
|
|
|
$cookieHeader = $_SERVER['HTTP_COOKIE'] ?? '';
|
|
|
|
$context = stream_context_create([
|
|
'http' => [
|
|
'method' => 'GET',
|
|
'header' => "Cookie: {$cookieHeader}\r\n" .
|
|
"X-Forwarded-For: " . ($_SERVER['REMOTE_ADDR'] ?? '') . "\r\n",
|
|
'timeout' => 10
|
|
]
|
|
]);
|
|
|
|
$html = @file_get_contents($ci4_url, false, $context);
|
|
|
|
include("inc/header.php");
|
|
include("inc/nav.php");
|
|
include("inc/ribbon.php");
|
|
|
|
echo '<div id="content">';
|
|
echo ($html !== false) ? $html : 'ERREUR: impossible de charger CI4';
|
|
echo '</div>';
|
|
|
|
include("inc/footer.php");
|
|
include("inc/scripts.php");
|
|
}
|
|
} |