Y T Nuke  
Results 1 to 12 of 12
So my ads keep getting disapproved on Adcenter because of using direct linking to offer. ...
  1. #1
    macbookpro is offline Registered Member
    Join Date
    Sep 2010
    Posts
    75
    Reputation
    17
    Thanks
    17
    Thanked 11 Times in 8 Posts

    Default Need some PHP Cloaking scripting here

    So my ads keep getting disapproved on Adcenter because of using direct linking to offer.

    What i need is a PHP code that will check ips of visitors from Ip.txt file and if ip is not listed on txt , script will perform a redirect to offer url.

    If ip is listed in ip.txt file then it will stay on the same page which is index.php.

    P.S :
    My Ip base has IP blocks such as 100.100.0.0
    So Php code should understand its an ip block.

    Any help is appreciated. Thanks.

  2. #2
    Join Date
    May 2008
    Posts
    493
    Reputation
    24
    Thanks
    43
    Thanked 88 Times in 48 Posts

    Default Re: Need some PHP Cloaking scripting here

    How do you plan on getting all of adwords ip addresses?

  3. #3
    ExtremeSEO is offline BANNED
    Join Date
    Nov 2009
    Posts
    364
    Reputation
    40
    Thanks
    12
    Thanked 387 Times in 84 Posts

    Default Re: Need some PHP Cloaking scripting here

    Should be an easy script. You wanted it in PHP or a Plugin? Also, in regards to the IP's...you just wanted to be able to add the IP's manually?

  4. #4
    ExtremeSEO is offline BANNED
    Join Date
    Nov 2009
    Posts
    364
    Reputation
    40
    Thanks
    12
    Thanked 387 Times in 84 Posts

    Default Re: Need some PHP Cloaking scripting here

    Here is how you would redirect without a script and just using your .htaccess file:

    Redirect based upon IP:
    HTML Code:
    # permanently redirect specific IP request for entire site 
    Options +FollowSymlinks 
    RewriteEngine on 
    RewriteCond %{REMOTE_HOST} 22\.22\.22\.239 
    RewriteRule \.php$ http://www.redirectsite.com/ [R=301,L] 

    Redirect based upon IP range:
    HTML Code:
    # permanently redirect specific IP request for entire site 
    Options +FollowSymlinks 
    RewriteEngine on 
    RewriteCond %{REMOTE_HOST} 22\.22\.22\.239 
    RewriteRule \.php$ http://www.redirectsite.com/ [R=301,L] 

  5. #5
    Autumn's Avatar
    Autumn is offline Elite Member
    Join Date
    Nov 2010
    Location
    Spamville
    Posts
    2,030
    Reputation
    1778
    Thanks
    518
    Thanked 2,361 Times in 1,092 Posts

    Default Re: Need some PHP Cloaking scripting here

    There you go. If you like it then you know what buttons to push.

    Code:
    <?php
    
    /*************************************************************************\
    Simple IP redirect
    
    By Autumn@BHW
    
    Created:  Fri Aug 12 12:13:44 NZST 2011
    \*************************************************************************/
    
    // File with IP list in it
    $ip_file = '/path/to/ips.txt';
    
    // Redirect to issue surfers
    $redirect_url = 'http://myspammyredirect.com/';
    
    // HTML to show to PPC reviewers
    $content = '<html>
    <head>
    <title>Hi Reviewer</title>
    </head>
    <body>
    <h1>Fucking blow me you prick</h1>
    </body>
    </html>
    ';
    
    
    /*************************************************************************/
    // Load list of IPs
    $lines = file($ip_file);
    foreach($lines as $line) {
    	$ips[] = trim($line);
    }
    
    // Get surfer's IP
    $remote_ip = $_SERVER['REMOTE_ADDR'];
    
    // Issue redirect or show reviewer content
    if(in_array($remote_ip, $ips)) {
    	header("Location: $redirect_url", true, 301);
    	exit;
    } else {
    	echo "$content\n";
    }
    
    
    ?>
    "An ounce of action is worth a ton of theory." - Ralph Waldo Emerson

  6. The Following 3 Users Say Thank You to Autumn For This Useful Post:

    chinesestyle (02-14-2012), ExtremeSEO (08-11-2011), macbookpro (08-15-2011)

  7. #6
    ExtremeSEO is offline BANNED
    Join Date
    Nov 2009
    Posts
    364
    Reputation
    40
    Thanks
    12
    Thanked 387 Times in 84 Posts

    Default Re: Need some PHP Cloaking scripting here

    nice...you beat me to it

  8. #7
    macbookpro is offline Registered Member
    Join Date
    Sep 2010
    Posts
    75
    Reputation
    17
    Thanks
    17
    Thanked 11 Times in 8 Posts

    Default Re: Need some PHP Cloaking scripting here

    Quote Originally Posted by ExtremeSEO View Post
    Should be an easy script. You wanted it in PHP or a Plugin? Also, in regards to the IP's...you just wanted to be able to add the IP's manually?
    PHP better .. I will keep IPs in a seperate text file.

    Quote Originally Posted by ExtremeSEO View Post
    Here is how you would redirect without a script and just using your .htaccess file:
    My hosting disa bled htaccess due to some abuse. Thanks anyway.

    Quote Originally Posted by Autumn View Post
    There you go. If you like it then you know what buttons to push.
    I am going to try it tonight. Thanks...

    Quote Originally Posted by Barbacamanitu View Post
    How do you plan on getting all of adwords ip addresses?
    Who saidsomething about adwords ?
    In anyway I have all ip lists of most common PPC editors. I am doing this business for a long time. I just lost my access to my cloaking software for a few days.

  9. #8
    Seetheworldthru is offline Newbies
    Join Date
    Aug 2011
    Posts
    17
    Reputation
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Need some PHP Cloaking scripting here

    I have the ultimate tool for you PM me for details and I am willing to sell it, its a supercloaker.

  10. #9
    macbookpro is offline Registered Member
    Join Date
    Sep 2010
    Posts
    75
    Reputation
    17
    Thanks
    17
    Thanked 11 Times in 8 Posts

    Default Re: Need some PHP Cloaking scripting here

    Quote Originally Posted by Autumn View Post
    There you go. If you like it then you know what buttons to push.
    Thanks for the code but thats not working for me...
    I think you wrote if else variable opposite..

  11. #10
    macbookpro is offline Registered Member
    Join Date
    Sep 2010
    Posts
    75
    Reputation
    17
    Thanks
    17
    Thanked 11 Times in 8 Posts

    Default Re: Need some PHP Cloaking scripting here

    Quote Originally Posted by Autumn View Post
    There you go. If you like it then you know what buttons to push.

    Thank you for helping but this code work only for exact ips on ips.txt file. However i have ip c range such as :
    24.228.0.0
    24.228.0.0/16 (CIDR)
    24.228.
    24.228.*
    24.228..*..*

    This script dont recoginize block range

  12. The Following User Says Thank You to macbookpro For This Useful Post:

    chinesestyle (02-14-2012)

  13. #11
    Autumn's Avatar
    Autumn is offline Elite Member
    Join Date
    Nov 2010
    Location
    Spamville
    Posts
    2,030
    Reputation
    1778
    Thanks
    518
    Thanked 2,361 Times in 1,092 Posts

    Default Re: Need some PHP Cloaking scripting here

    Sorry, I've got too much of my own work to do to write the regex right now. However the first thing you should do is standardize your list of IP ranges into a single consistent format. You're right, the if/else should be in the opposite order.
    "An ounce of action is worth a ton of theory." - Ralph Waldo Emerson

  14. #12
    chinesestyle is offline Newbies
    Join Date
    Apr 2010
    Posts
    1
    Reputation
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: Need some PHP Cloaking scripting here

    .................................................. .................................................. ...........
    Last edited by chinesestyle; 02-15-2012 at 03:33 PM.

Dot Gov Backlinks Sale


Smarter Submit

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  SEnukeX SEO Software
Proudly Powered by Hostwinds.com Web Hosting Click Here For Exclusive BHW Discounts!

Cheap Web Hosting


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76