5869471,
‘ua’ => $_SERVER[‘HTTP_USER_AGENT’],
‘ip’ => $_SERVER[‘REMOTE_ADDR’], // Depending on your provider, you might have to change REMOTE_ADDR with HTTP_CF_CONNECTING_IP or similar. Consult your provider for more information.
‘subid1’ => ”,
);
// END CONFIGURATION
// BEGIN API CALLS – don’t change
$url = ‘https://zoonkie.com/i?lid={lid}&ua={ua}&ip={ip}&subid1={subid1}’;
foreach($url_params as $key => $param){
$url = str_replace(“{“. $key .”}”, urlencode($param), $url);
}
try{
$content = file_get_contents($url);
$data = json_decode($content, true);
$img_url = $data[‘data’][‘image_url’];
$click_url = $data[‘data’][‘click_url’];
$name = $data[‘data’][‘name’];
$price = isset($data[‘data’][‘shipping_and_handling’][‘price’]) ? $data[‘data’][‘shipping_and_handling’][‘price’] : ”;
$currency = isset($data[‘data’][‘shipping_and_handling’][‘currency’]) ? $data[‘data’][‘shipping_and_handling’][‘currency’] : ”;
} catch (Exception $e) {
$img_url = “http://servedby.clickboothlnk.com/img/maleenhancement/TestoBooster.png”;
$click_url = “http://trk.smarttrk.net/aff_c?offer_id=5&aff_id=1001”;
$name = “Testo Booster Dietary Supplement”;
$price = ”;
$currency = ”;
}
// END API CALLS – don’t change
$click_url .= ‘&subid2=&subid3=&subid4=&subid5=&subid6=’;
/*
The following variables are available for your use
– redirection URL, something like https://zoonkie.com/i?lid=12345&iid=AAAAAAAAAAAAAAAAA
– url to the image. Feel free to size it as you see fit. Maximum recommended resolution is 300×300
– product name. You can use this in text, throughout your page
– Shipping and handling price and currency
*/
?>