How to get the list of registered countries via API?

URL: http://www.namedoseusite.com.br/api_products_ots.php?action=Countries




Header Parameter format
Usuario1 base64_encode ()
password1 base64_encode ()

Php Sample:

 // sample country

if ($ _Get [' Action '] == ' Countries ') {

$ URL = $ tabain_url. ' /API_Products_Ors.php? Action = Countries ' ;;

$ CH = curl_init ($ URL);
Curl_Setopt ($ CH, Curlopt_Returntransfer, True);
curl_setopt ($ CH, curlopt_ssl_verifypeer, false);
Curl_Setopt ($ CH, Curlopt_httpheader, Array (
' CONTENT-TYPE: Application/JSON ',
"Cache-Control: No-Cache",
' TOKEN: ' . base64_encode ($ token),
' Secret: ' . base64_encode ($ secret),
' E-mail: ' . base64_encode ($ email),
' CONTENT-LENGTH: ' . Strlen ($ data_string)))
);

$ result = curl_exec ($ CH);
Curl_Close ($ CH);

print_r ($ result);

}

// sample Countries EOF

return:

id
Text

Leave a Reply 0