Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('MARKETPLACE_URL', 'https://marketplace.emag.bg');
- define('MARKETPLACE_API_URL', 'https://marketplace.emag.bg/api-3');
- define('MARKETPLACE_API_URL', 'https://marketplace.emag.bg/api-3');
- $data =
- array (
- 'currentPage' => 1,
- 'itemsPerPage' => 10
- );
- $hash = sha1(http_build_query($data).sha1('lancombg123'));
- $requestData = array(
- 'username' => 'lancombg',
- 'data' => $data,
- 'hash' => $hash);
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, MARKETPLACE_URL . '/api-3/category/read');
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
- curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($requestData));
- $result = curl_exec($ch);
- echo '<pre>' . print_r($result, true) . '</pre>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement