<?php
header('Content-type: application/json');
$url = isset($_GET['url']) ? $_GET['url'] : 'https://api.preprod.myfourchette.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);
