zest-adz simple php install code

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

    zest-adz simple php install code

    i have edited the zest-adz php install code because the default one looked a bit weird for me, so here is a simple zest-adz php install code for text ads:

    PHP Code:
    function zestad() 
    {
        
    $cid_zest ="14131C047A5041444E5A465C4153405E88882D"// your zest-adz site id
               
    $mt_zest="Your meta data here";#
               //CHANGE THE AD TYPE AS YOUR PREFERRENCE 
        
    $ad_type urlencode("Text");

        
    // request ZestADZ ad 
        

        //DO NOT EDIT BELOW THIS LINE
        
    $ua_zest urlencode(getenv("HTTP_USER_AGENT")); 
        
    $ip_zest urlencode($_SERVER['REMOTE_ADDR']); 
        
    //CHANGE THE TIME OUT MESSAGE AS YOUR PREFERNCE
        
    $mt_zest urlencode($mt_zest);
        
    $page_url  sprintf("http%s://%s%s",(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE "s"""),$_SERVER["HTTP_HOST"],$_SERVER["REQUEST_URI"]);
        
    $page_urlurlencode($page_url);
        
        
    $url_zest='http://a.zestadz.com/waphandler?cid='.$cid_zest.'&ua='.$ua_zest.'&ip='.$ip_zest.'&meta='.$mt_zest.'&ad_type='.$ad_type.'&url='.$page_url.'&userid=&pageviewid='
        
    $adrequest curl_init(); 
        
    curl_setopt$adrequestCURLOPT_URL$url_zest); 
        
    curl_setopt$adrequestCURLOPT_RETURNTRANSFER);
        
    curl_setopt$adrequestCURLOPT_TIMEOUT); 
        
    curl_setopt$adrequestCURLOPT_CONNECTTIMEOUT);
        
    curl_setopt$adrequestCURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded","Connection: Close")); 
        
    $content curl_exec($adrequest); 
        
    curl_close($adrequest); 
        
        
        
    // output content 
        
    $content_zest explode("~",$content);
        if(isset(
    $content_zest[2]))
        {
            
    $lm_zest=$content_zest[0];
            
    $lm_zest $lm_zest.("~").("ck"); 
            
    $xr_zest $content_zest[2];
            
    $ad_landing_zest 'http://a.zestadz.com/waplanding?lm='.$lm_zest.''
            return 
    '<a href="'$ad_landing_zest .'">'.$xr_zest .'</a>'
        }

    usage:
    PHP Code:
    echo zestad(); 
    Advertise your mobile site for FREE with AdTwirl


    #2
    i want also image code plz give me

    Comment


      #3
      Originally posted by wapking.in View Post
      i want also image code plz give me
      for image + text use this function:
      PHP Code:
      function zestad()  

          
      $cid_zest ="14131C047A5041444E5A465C4153405E88882D"// your zest-adz site id 
          
      $mt_zest="Your meta data here";
                 
      //CHANGE THE AD TYPE AS YOUR PREFERRENCE  
          
      $ad_type urlencode("Text+Picture"); 

          
      // request ZestADZ ad  
           

          //DO NOT EDIT BELOW THIS LINE 
          
      $ua_zest urlencode(getenv("HTTP_USER_AGENT"));  
          
      $ip_zest urlencode($_SERVER['REMOTE_ADDR']);  
          
      //CHANGE THE TIME OUT MESSAGE AS YOUR PREFERNCE 
          
      $mt_zest urlencode($mt_zest); 
          
      $page_url  sprintf("http%s://%s%s",(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE "s"""),$_SERVER["HTTP_HOST"],$_SERVER["REQUEST_URI"]); 
          
      $page_urlurlencode($page_url); 
           
          
      $url_zest='http://a.zestadz.com/waphandler?cid='.$cid_zest.'&ua='.$ua_zest.'&ip='.$ip_zest.'&meta='.$mt_zest.'&ad_type='.$ad_type.'&url='.$page_url.'&userid=&pageviewid=';  
          
      $adrequest curl_init();  
          
      curl_setopt$adrequestCURLOPT_URL$url_zest);  
          
      curl_setopt$adrequestCURLOPT_RETURNTRANSFER); 
          
      curl_setopt$adrequestCURLOPT_TIMEOUT);  
          
      curl_setopt$adrequestCURLOPT_CONNECTTIMEOUT); 
          
      curl_setopt$adrequestCURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded","Connection: Close"));  
          
      $content curl_exec($adrequest);  
          
      curl_close($adrequest);  
           
           
          
      // output content  
           
      $content_zest explode("~",$content); 
          if(isset(
      $content_zest[2])) 
          { 
              
      $lm_zest=$content_zest[0]; 
              
      $lm_zest $lm_zest.("~").("ck");  
              
      $xr_zest $content_zest[2]; 
              
      $ad_landing_zest 'http://a.zestadz.com/waplanding?lm='.$lm_zest.'';  
              if(
      $content_zest[1]!=2$xr_zest '<img src="'.$xr_zest.'" alt=""/>';
              return 
      '<a href="'$ad_landing_zest .'">'.$xr_zest .'</a>';  
          }
          return 
      $content_zest;

      Advertise your mobile site for FREE with AdTwirl

      Comment

      Working...
      X