<?php
CURLOPT_URL => "https://a...content-available-to-author-only...s.ai/v2/client/offers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (HTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
"X-Api-Token: ca4bc98f-1c8b-4e8d-81ac-377f1745e93f",
"X-User-Id: 1",
"accept: application/json"
],
]);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
PD9waHAKCiRjdXJsID0gY3VybF9pbml0KCk7CgpjdXJsX3NldG9wdF9hcnJheSgkY3VybCwgWwogIENVUkxPUFRfVVJMID0+ICJodHRwczovL2EuLi5jb250ZW50LWF2YWlsYWJsZS10by1hdXRob3Itb25seS4uLnMuYWkvdjIvY2xpZW50L29mZmVycyIsCiAgQ1VSTE9QVF9SRVRVUk5UUkFOU0ZFUiA9PiB0cnVlLAogIENVUkxPUFRfRU5DT0RJTkcgPT4gIiIsCiAgQ1VSTE9QVF9NQVhSRURJUlMgPT4gMTAsCiAgQ1VSTE9QVF9USU1FT1VUID0+IDMwLAogIENVUkxPUFRfSFRUUF9WRVJTSU9OID0+IENVUkxfSFRUUF9WRVJTSU9OXzFfMSwKICBDVVJMT1BUX0NVU1RPTVJFUVVFU1QgPT4gIkdFVCIsCiAgQ1VSTE9QVF9IVFRQSEVBREVSID0+IFsKICAgICJVc2VyLUFnZW50OiBNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEhUTUwsIGxpa2UgR2Vja28pIENocm9tZS81OC4wLjMwMjkuMTEwIFNhZmFyaS81MzcuMyIsCiAgICAiWC1BcGktVG9rZW46IGN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AgU2FmYXJpLzUzNy4zJnF1b3Q7LAogICAgJnF1b3Q7WC1BcGktVG9rZW46IGNhNGJjOThmLTFjOGItNGU4ZC04MWFjLTM3N2YxNzQ1ZTkzZiZxdW90OywKICAgICZxdW90O1gtVXNlci1JZDogMTAmcXVvdDssCiAgICAmcXVvdDthY2NlcHQ6IGFwcGxpY2F0aW9uL2pzb24mcXVvdDsKICBdLApdKTsKCiRyZXNwb25zZSA9IGN1cmxfZXhlYygkY3VybCk7CiRlcnIgPSBjdXJsX2Vycm9yKCRjdXJsKTsKCmN1cmxfY2xvc2UoJGN1cmwpOwoKaWYgKCRlcnIpIHsKICBlY2hvICZxdW90O2NVUkwgRXJyb3IgIzomcXVvdDsgLiAkZXJyOwp9IGVsc2UgewogIGVjaG8gJHJlc3BvbnNlOwp9
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://a...content-available-to-author-only...s.ai/v2/client/offers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (HTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
"X-Api-Token: ca4bc98f-1c8b-4e8d-81ac-377f1745e93f",
"X-User-Id: 10",
"accept: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}