<?php
header('Content-type: application/json');
if (isset($_GET['url']))
{
    $url = $_GET['url'];
}
$url = "https://api.preprod.lafourchette.com/api?" . http_build_query($_GET);
$file = fopen ($url, "r");
if (!$file) {
    echo "<p>Impossible de lire la page.\n";
    exit;
}
while (!feof ($file)) {
    $line = fgets ($file, 1024);
    echo $line;
}
fclose($file);
