Bonjour,
j'utilise CURL en ligne sur mon hebergement mais en local cela ne fonctionne pas.
j'ai Wampserver 3.0.6.

j'ai bien activé Curl dans php.ini.

Voici au cas ou mon code.
quelqu'un a une idée ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
    $json = json_encode($_POST);
 
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'https://.........');
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
            'Content-Type: application/json'
        ]
    );