Buzzcity Banner Ad Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Buzzcity Banner Ad Code

    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>";
    }
    ?>

    #2
    So where is it?

    Comment


      #3
      Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

      LINE:
      $output = preg_match_all('/{"cid":['"]([^'"]+)['"].*}]}]}/i',$text,$buzzads);

      Comment


        #4
        When looking @ the code i can't see point where is it actually detecting these free ads? Can u explain it a little bit?

        Comment


          #5
          i think that you can disable free and cpd ads in your buzzcity account
          Advertise your mobile site for FREE with AdTwirl

          Comment


            #6
            @GumSlone When i last checked buzzcity it only gives cpd ads to disable. Are you sure that buzzcity offers free ads to disable. Please tell us how to do it.
            Last edited by metulj; 01.07.12, 20:02.

            Comment


              #7
              here is the screenshot
              Attached Files
              Advertise your mobile site for FREE with AdTwirl

              Comment


                #8
                Originally posted by GumSlone View Post
                here is the screenshot
                Thanks for the Info Buddy!!!

                Comment

                Working...
                X