APIを介して国から州のリストを取得する方法は?
url:http://www.namedoseusite.com.br/api_customers.php?country_id = country_id&
パラメーター | フォーマット | 説明 |
country_id | get |
国の番号ID |
phpサンプル:
$ add_query_order ='&#39 ;;
$ country_id ='&#39 ;;
if($ country_id!=''){
$ add_query_order。='& country_id =' $ country_id;
}
$ url = $ tabain_url。 ' /api_customers.php?action = customs_state'
$ 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'、
「キャッシュコントロール:キャッシュなし」、
' usuario1:' 。 base64_encode($ usuario1)、
' Password1:' 。 base64_encode($ password1)))
);
$ result = curl_exec($ ch);
curl_close($ ch);
print_r($ result);
//サンプル顧客の状態リストeof
返品:
id
テキスト< /p>