From dff42b6c1f22e899c98d9f322d602c634d0e98b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDilvinas?= <159907476+ZilvinasSP@users.noreply.github.com> Date: Wed, 29 May 2024 15:34:36 +0300 Subject: [PATCH] Add files via upload --- php/amazon_bestsellers.php | 31 +++++++++++++++++++++++++++++++ php/amazon_pricing.php | 30 ++++++++++++++++++++++++++++++ php/amazon_product.php | 30 ++++++++++++++++++++++++++++++ php/amazon_questions.php | 29 +++++++++++++++++++++++++++++ php/amazon_reviews.php | 30 ++++++++++++++++++++++++++++++ php/amazon_search.php | 30 ++++++++++++++++++++++++++++++ 6 files changed, 180 insertions(+) create mode 100644 php/amazon_bestsellers.php create mode 100644 php/amazon_pricing.php create mode 100644 php/amazon_product.php create mode 100644 php/amazon_questions.php create mode 100644 php/amazon_reviews.php create mode 100644 php/amazon_search.php diff --git a/php/amazon_bestsellers.php b/php/amazon_bestsellers.php new file mode 100644 index 0000000..b478849 --- /dev/null +++ b/php/amazon_bestsellers.php @@ -0,0 +1,31 @@ + "amazon_bestsellers", + "query" => "sports-collectibles", + "page_from" => "1", + "num_pages" => "10", + "parse" => true, +]); + +$headers = [ + "Accept: application/json", + "Content-Type: application/json", + "Authorization: Basic [your basic authentication token]" +]; + +$ch = curl_init($url); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + +$response = curl_exec($ch); +if (curl_errno($ch)) { + echo 'Error:' . curl_error($ch); +} +curl_close($ch); + +echo $response; +?> \ No newline at end of file diff --git a/php/amazon_pricing.php b/php/amazon_pricing.php new file mode 100644 index 0000000..00ac735 --- /dev/null +++ b/php/amazon_pricing.php @@ -0,0 +1,30 @@ + "amazon_pricing", + "query" => "B09H74FXNW", + "page_from" => "1", + "parse" => true, +]); + +$headers = [ + "Accept: application/json", + "Content-Type: application/json", + "Authorization: Basic [your basic authentication token]" +]; + +$ch = curl_init($url); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + +$response = curl_exec($ch); +if (curl_errno($ch)) { + echo 'Error:' . curl_error($ch); +} +curl_close($ch); + +echo $response; +?> \ No newline at end of file diff --git a/php/amazon_product.php b/php/amazon_product.php new file mode 100644 index 0000000..ca602aa --- /dev/null +++ b/php/amazon_product.php @@ -0,0 +1,30 @@ + "amazon_product", + "query" => "B09H74FXNW", + "parse" => true, + "autoselect_variant": false +]); + +$headers = [ + "Accept: application/json", + "Content-Type: application/json", + "Authorization: Basic [your basic authentication token]" +]; + +$ch = curl_init($url); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + +$response = curl_exec($ch); +if (curl_errno($ch)) { + echo 'Error:' . curl_error($ch); +} +curl_close($ch); + +echo $response; +?> \ No newline at end of file diff --git a/php/amazon_questions.php b/php/amazon_questions.php new file mode 100644 index 0000000..ac09c9b --- /dev/null +++ b/php/amazon_questions.php @@ -0,0 +1,29 @@ + "amazon_questions", + "query" => "B09H74FXNW", + "parse" => true, +]); + +$headers = [ + "Accept: application/json", + "Content-Type: application/json", + "Authorization: Basic [your basic authentication token]" +]; + +$ch = curl_init($url); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + +$response = curl_exec($ch); +if (curl_errno($ch)) { + echo 'Error:' . curl_error($ch); +} +curl_close($ch); + +echo $response; +?> \ No newline at end of file diff --git a/php/amazon_reviews.php b/php/amazon_reviews.php new file mode 100644 index 0000000..d560acf --- /dev/null +++ b/php/amazon_reviews.php @@ -0,0 +1,30 @@ + "amazon_reviews", + "query" => "B09H74FXNW", + "page_from" => "1", + "parse" => true, +]); + +$headers = [ + "Accept: application/json", + "Content-Type: application/json", + "Authorization: Basic [your basic authentication token]" +]; + +$ch = curl_init($url); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + +$response = curl_exec($ch); +if (curl_errno($ch)) { + echo 'Error:' . curl_error($ch); +} +curl_close($ch); + +echo $response; +?> \ No newline at end of file diff --git a/php/amazon_search.php b/php/amazon_search.php new file mode 100644 index 0000000..6fa8210 --- /dev/null +++ b/php/amazon_search.php @@ -0,0 +1,30 @@ + "amazon_search", + "query" => "laptop", + "page_from" => "1", + "parse" => true, +]); + +$headers = [ + "Accept: application/json", + "Content-Type: application/json", + "Authorization: Basic [your basic authentication token]" +]; + +$ch = curl_init($url); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_POST, true); +curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); +curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + +$response = curl_exec($ch); +if (curl_errno($ch)) { + echo 'Error:' . curl_error($ch); +} +curl_close($ch); + +echo $response; +?> \ No newline at end of file