URL: http://www.namedoseusite.com.br/api_ds_products_ots.php?action=Countries
Paramètre d’en-tête |
format |
TOKEN |
base64_encode () |
Secret |
base64_encode () |
Email |
base64_encode () |
Table>
PHP Échantillon:
// Exemple de pays
$ Url = $ tabain_url. & # 39; /API_DS_PRODUCTS_ORS.PHP? Action = Pays & # 39 ;;
$ Ch = curl_init ($ url);
Curl_setopt ($ ch, curlopt_returntransfer, true);
curl_setopt ($ ch, curlopt_ssl_verifypeer, false);
Curl_setopt ($ ch, curlopt_httpheader, array (
& # 39; Type de contenu: application / json & # 39;,
"Cache-Control: No-cache",
& # 39; token: & # 39; . base64_encode (token $),
& # 39; secret: & # 39; . base64_encode ($ secret),
& # 39; e-mail: & # 39; . base64_encode ($ e-mail),
& # 39; Content-Length: & # 39; . Strlen ($ data_string)))
));
$ result = curl_exec ($ ch);
Curl_close ($ ch);
print_r ($ result);
// Exemple de pays EOF
Retour:
id
texte