update
This commit is contained in:
32
application/controllers/Inventaire.php
Normal file
32
application/controllers/Inventaire.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user