bonjour afin d'ajouter une couche cartographique dans interface carto de IGN je dois passé par un proxy php mais la documentation de ign sur utilisation du proxy est assez pauvre pour un debutant et je ne sais pas comment renseigner le proxy
la page de interface carto : http://andromede.univ-perp.fr/sigweb2008/hoarauf/geoportail/geo.php
la page de ma couche carto à rajouter :http://andromede.univ-perp.fr/sigweb2008/hoarauf/geoportail/test.kml
voici le code du proxy : pouvez vous m'aider?
[CODE]
<?php
// Get the REST call path from the AJAX application
// Is it a POST or a GET?
$url = ($_POST['URL']) ? $_POST['URL'] : $_GET['url'];
// Open the Curl session
$session = curl_init($url);
// If it's a POST, put the POST data in the body
if ($_POST['url']) {
$postvars = '';
while ($element = current($_POST)) {
$postvars .= key($_POST).'='.$element.'&';
next($_POST);
}
curl_setopt ($session, CURLOPT_POST, true);
curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars);
}
// Don't return HTTP headers. Do return the contents of the call
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
// Possibly go through local proxy
//curl_setopt($session, CURLOPT_PROXY, 'proxy_host:proxy:port');
// Make the call
$xml = curl_exec($session);
// The web service returns XML. Set the Content-Type appropriately
header("Content-Type: text/xml");
echo $xml;
curl_close($session);
?>
[/CODE]
merci