how to show ads of adultmoda and admoda ?

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

    how to show ads of adultmoda and admoda ?

    any1 know how to show ads of adultmoda and admoda? or maybe they blocked opera and mozilla browser? pls help!

    #2
    maybe try test mode ?

    Comment


      #3
      PHP Code:
      function adultmoda()
      {
          $ZONEID     = 2152; // PUT HERE YOUR ID
          $SERVER_URL = 'http://www.adultmoda.com/ads/fetch.php'; 
      
      // --------------------------------------------------------
      
          $ip = (isset($_SERVER['REMOTE_ADDR'])) 
              ? $_SERVER['REMOTE_ADDR'] : "0.0.0.0";
          $ua  = (isset($_SERVER['HTTP_USER_AGENT'])) 
              ? $_SERVER['HTTP_USER_AGENT'] : '';
      
          if (isset($HTTP_SERVER_VARS['HTTP_X_OPERAMINI_PHONE_UA'])) {
            $ua = $HTTP_SERVER_VARS['HTTP_X_OPERAMINI_PHONE_UA'];
            $ip = $HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR'];
          }
      
          $url = sprintf("%s?v=2&l=php&z=%d&a=%s&ua=%s",
              $SERVER_URL, $ZONEID, $ip, urlencode( $ua )
          );
      
          $packed = '';
          $request = curl_init();
          $request_timeout = 1; // 1 second timeout
          curl_setopt($request, CURLOPT_URL, $url);
          curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
          curl_setopt($request, CURLOPT_TIMEOUT, $request_timeout);
          curl_setopt($request, CURLOPT_CONNECTTIMEOUT, $request_timeout);
          curl_setopt($request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
      
          $packed = curl_exec($request);
          curl_close($request);
      
          if ($packed != '') {
              $banner = explode('|', $packed);
              @$bannerid  = $banner[0];
              $tmp = str_replace( "&", "&", $banner[1] );
              @$image_url = str_replace( "&", "&", $tmp);
              $tmp = str_replace( "&", "&", $banner[2] );
              @$click_url = str_replace( "&", "&", $tmp);
              $tmp = str_replace( "&", "&", $banner[3] );
              @$text = str_replace( "&", "&", $tmp);
              if ($bannerid) {
                  $text = ($text) ? $text : "Click here...";
                  
                  if ($image_url) {
                      $ad .= "\n<a href=\"$click_url\"><img src=\"$image_url\" alt=\"Advert\" /></a><br />\n";
                  }
                  $ad .= "<a href=\"$click_url\">$text</a><br />\n";
                  return $ad;
              }
          }
      } 
      

      USAGE:
      PHP Code:
      echo adultmoda(); 
      
      Advertise your mobile site for FREE with AdTwirl

      Comment

      Working...
      X