Promo

5883246, ‘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/b?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); $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) { $click_url = “”; $name = “”; $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/b?lid=12345&brand_id=AAAAAAAAAAAAAAAAA – brand name. You can use this in text, throughout your page */ ?>

Leave a Comment