stop serve ads after user point going low

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

    #16
    not work in my host any other idea plz
    http://nepalwap.com/ad/go/?uid=4&adult=on&mode=live
    working bt error showing in php adcode. Php adcode link http://nepalwap.com/ad/ad.php

    my php ad code
    PHP Code:
    <?php
    /*
    Do not change this code without prior permission from NepalWAP ad Network!
    If You Do So Then Your Account Will Be Suspended Without Any Warning !!!
    */

    function show_nepalwap_ad()
    {          
    $ua $_SERVER["HTTP_USER_AGENT"];
       
    $ip = isset ($_SERVER["HTTP_X_FORWARDED_FOR"]) ?
     
    $_SERVER["HTTP_X_FORWARDED_FOR"] : 
    $_SERVER["REMOTE_ADDR"];
       if(
    strstr($ip','))
       {
          
    $ips explode(','$ip);
          
    $ip $ips[0];
       }
        
    $params  'uid='.urlencode('4'); // set your uniqe id

        
    $params .= '&HTTP_USER_AGENT='.urlencode($ua);
        
    $params .= '&REMOTE_ADDR='.urlencode($ip);
        
    $params .= '&adult='.urlencode('1');  // set 1 for on value or 0 for off value

        
    $params .= '&mode='.urlencode('live');  // set mode 'live' to show ads 'test' to disable ads
        // send ad request
        
    $url "http://nepalwap.com/ad/go/?".$params;
        
    $timeout 5
        
    $ch  curl_init();
        
    curl_setopt($chCURLOPT_URL$url);
        
    curl_setopt($chCURLOPT_HEADER0);
        
    curl_setopt($chCURLOPT_FAILONERRORTRUE);
        
    curl_setopt($chCURLOPT_TIMEOUT$timeout);
        
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
        @
    curl_setopt($chCURLOPT_FOLLOWLOCATION1);
        
    $html curl_exec($ch);
        
    curl_close($ch);
        if(
    $html !== false) return $html;
        else return 
    "";
    }

    ?>
    <?php
    // copy this snippet elsewhere on your page for display more of ads
    echo show_nepalwap_ad();
    ?>
    Last edited by Nepsalone; 16.01.13, 16:55.

    Comment


      #17
      Get the user's points into a variable and then do something like this
      PHP Code:
      <?php
      if($user_points>1500)
      {
      ///show ads
      }
      ?>
      The ">" means "more than"...
      Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

      Comment


        #18
        how to intergate ds code can u xplain me

        Comment

        Working...
        X