URL: http://www.namedoseusite.com.br/api_products_ots.php?action=list_products
Paramètre d’en-tête |
format |
usuario1 |
base64_encode () |
Password1 |
base64_encode () |
Table>
Paramètre |
format |
Description |
Statut |
Get |
1, 2 ou 3 Seul le nombre est requis
|
search_model |
Get |
Modèle de produit |
Rechercher |
Get |
Nom du produit |
Catégorie |
Get |
Numéro de catégorie Seul le nombre est requis |
sort_order |
Get |
Ordre chanceux par: sort_product_name sort_date_added sort_date_updated sort_code sort_quantity sort_price sort_bestseller td>
|
Table>
PHP Échantillon:
// Exemples de produits de liste
$ add_query_order = & # 39; & # 39 ;;
if ($ _get [& # 39; statut & # 39;]! = & # 39; & # 39;) {
$ add_query_order. = & # 39; & amp; status = & # 39; $ _ get [& # 39; status & # 39;];
}
if ($ _get [& # 39; search_model & # 39;]! = & # 39; & # 39;) {
$ add_query_order. = & # 39; & amp; search_model = & # 39; $ _ get [& # 39; search_model & # 39;];
}
if ($ _get [& # 39; Recherche & # 39;]! = & # 39; & # 39;) {
$ add_query_order. = & # 39; & amp; search = & # 39; $ _ get [& # 39; search & # 39;];
}
if ($ _get [& # 39; catégorie & # 39;]! = & # 39; & # 39;) {
$ add_query_order. = & # 39; & amp; catégorie = & # 39; $ _ get [& # 39; catégorie & # 39;];
}
if ($ _get [& # 39; sort_order & # 39;]! = & # 39; & # 39;) {
$ add_query_order. = & # 39; & amp; sort_order = & # 39; $ _ get [& # 39; sort_order & # 39;];
}
$ Url = $ tabain_url. & # 39; /api_seller_products_others.php? Action = list_products & # 39 ;. $ add_query_order;
$ 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; usuario1: & # 39; . base64_encode ($ usuario1),
& # 39; Password1: & # 39; . base64_encode ($ password1),
& # 39; Content-Length: & # 39; . Strlen ($ data_string)))
));
$ result = curl_exec ($ ch);
Curl_close ($ ch);
print_r ($ result);
// Exemples de produits de liste EOF
Retour:
Products_id
image
Nom
Modèle
Quantité
Statut
Date_Added
Last_Modified P>