0byt3m1n1
Path:
/
home
/
kassiope
/
www
/
achat
/
[
Home
]
File: mondial_relay.php
<?php require_once('../lib/nusoap/nusoap.php'); // Global Settings definition // Définition des paramètres globaux $MR_WebSiteId = "CC20XL6Z"; $MR_WebSiteKey = "RQjvgieK"; $client = new nusoap_client("http://api.mondialrelay.com/Web_Services.asmx?WSDL", true); $client->soap_defencoding = 'utf-8'; // We define the parameters as a string array. Each Key/Val represents a parameter of the soap call // On défini les paramètres dans un tableau de chaînes. Chaque paire Clé/Valeur est un paramètre de l'appel SOAP $params = array( 'Enseigne' => $MR_WebSiteId, 'Pays' => "FR", //'NumPointRelais' => "", 'Ville' => "", 'CP' => "13009", 'Latitude' => "", 'Longitude' => "", 'Taille' => "", 'Poids' => "", 'Action' => "", 'DelaiEnvoi' => "0", 'RayonRecherche' => "20", //'TypeActivite' => "", //'NACE' => "", ); // We generate the request's security code // On génère la clé de sécurité de l'appel $code = implode("", $params); $code .= $MR_WebSiteKey; $params["Security"] = strtoupper(md5($code)); // We make the call and load it in the $result var // On réalise l'appel et stocke le résultat dans la variable $result $result = $client->call( 'WSI3_PointRelais_Recherche', $params, 'http://api.mondialrelay.com/', 'http://api.mondialrelay.com/WSI3_PointRelais_Recherche' ); // We check their is no error during the process // On vérifie qu'il n'y a pas eu d'erreur if ($client->fault) { echo '<h2>Fault (Expect - The request contains an invalid SOAP body)</h2><pre>'; print_r($result); echo '</pre>'; } else { $err = $client->getError(); if ($err) { echo '<h2>Error</h2><pre>' . $err . '</pre>'; } else { echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>'; } } echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>'; echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>'; echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>'; ?>