Here is the buzzcity banner ad code with no free ads. So only paid ads will be shown & your clicks will not get wasted.
Code:
<?php //Created by Adfresh.in //Wapmasters join & earn at www.adfresh.in //Use at your own Risk !! ///Customization Area/// $partnerid = "33530"; ///End Customization Area/// $ip = ''; $ua = ''; $browser = ''; // Extract full IP info (including Opera Mini) if (empty($ip)) { $keyname_ip_arr = array('HTTP_X_FORWARDED_FOR', 'HTTP_REMOTE_ADDR_REAL', 'REMOTE_ADDR'); foreach ($keyname_ip_arr as$keyname_ip) { if (!empty($_SERVER[$keyname_ip])) { $ip = urlencode($_SERVER[$keyname_ip]); break; } } } // extract full UA info $keyname_ua_arr = array('HTTP_X_DEVICE_USER_AGENT', 'HTTP_X_OPERAMINI_PHONE_UA', 'HTTP_X_BOLT_PHONE_UA', 'HTTP_X_MOBILE_UA', 'HTTP_USER_AGENT'); foreach ($keyname_ua_arr as$keyname_ua) { if (isset($_SERVER[$keyname_ua])&&!empty($_SERVER[$keyname_ua])) { $ua = urlencode($_SERVER[$keyname_ua]); break; } } // extract browser info $keyname_browser_arr = array('OPERAMINI', 'BOLT'); foreach ($keyname_browser_arr as $keyname_browser) { if (isset($_SERVER['HTTP_X_'.$keyname_browser.'_PHONE_UA'])) { $browser = $keyname_browser; break; } } $url = "http://show.buzzcity.net/showads.php?get=mweb&partnerid=$partnerid&ip=$ip&ua=$ua&browser=$browser"; // # Use this if curl is not installedon your server # // $ad_serve = @fopen($url,'r'); // $contents = ''; // if ($ad_serve) { // while (!feof($ad_serve))$contents .= fread($ad_serve,1024); // fclose($ad_serve); // } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_HEADER,0); curl_setopt($ch, CURLOPT_FAILONERROR, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3); $contents = curl_exec($ch); curl_close($ch); if (!empty($contents)) { $link = explode("n", $contents); if (isset($link) && !empty($link)) { // display BuzzCity TextAd $text = $link[0]; } } $output = preg_match_all('/{"cid":['"]([^'"]+)['"].*}]}]}/i',$text,$buzzads); $cid = $buzzads[1] [0]; $output1 = preg_match_all('/"cntr":['"]([^'"]+)['"].*,/i', $text, $buzzads1); $country = $buzzads1[1] [0]; $output2 = preg_match_all('/"ecpm":['"]([^'"]+)['"].*"/i',$text,$buzzads2); $free = $buzzads2[1] [0]; if ($free=="0.0000") { echo "<a href='http://adfresh.in/ads/2'><img src='http://adfresh.in/banner/2'></a>"; } else { echo "<a href='http://click.buzzcity.net/click.php?partnerid=$partnerid&cid=$cid'><img src='http://show.buzzcity.net/img.php?partnerid=$partnerid&cid=$cid&cntr=$country'></a>"; } ?>
Comment