Coding php ThirdPartyAPI
hitpath API: Read Affiliates Record
May 15, 2023
0
, ,
<?php

$offset = 0;
$limit  = 10;

$url = "http://api.1318amethyst.com/api/v1.1/affiliates?all_details=1&offset=$offset&limit=$limit";

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPGET, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
   "auth_token:6d4888962feba3c669176b81edacb185",
   "accept:application/json",
));

$raw_response = curl_exec($ch);
$response = json_decode($raw_response);
$error = curl_error($ch);
$tmp_file = 'h3.txt';

if ($error) {
   $response->error = curl_error($ch);
} else {
   file_put_contents($tmp_file, $raw_response);
   //$this->file_transfer->send_file($tmp_file, $tmp_file);

}

curl_close($ch);

echo $raw_response;
?>

About author

ZERIN

CEO & Founder (BdBooking.com - Online Hotel Booking System), CEO & Founder (TaskGum.com - Task Managment Software), CEO & Founder (InnKeyPro.com - Hotel ERP), Software Engineer & Solution Architect

How do i install older version of CI4 using composer

Sometimes when you run git update & composer u...

Read more

hitpath API: Read Campaigns Record

<?php $offset = 0; $limit = 10; $url = "http://...

Read more

hitpath API: Read Advertisers Record

<?php $offset = 0; $limit = 10; $url = "http://...

Read more

There are 0 comments

Leave a Reply

Your email address will not be published. Required fields are marked *