Black Hat Forum Black Hat SEO The only backlink provider with unlimited projects/links per day!
Go Back   Black Hat Forum Black Hat SEO > Black Hat SEO > Cloaking and Content Generators

Cloaking and Content Generators Discuss Cloaking, Doorway pages and Automatic content generators for search engine optimization

Mad Content   BLOG SEO
Search
 
LinkWheel

LiveChatAgent



Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-08-2009, 07:56 PM
Registered Member
 
Join Date: Aug 2008
Posts: 70
Thanks: 16
Thanked 15 Times in 4 Posts
Reputation: 10
iTrader: (0)
Default Text rotator based on IP

I am looking for a simple php script that can rotate text based on IP(Computer IP).

I got a site and if you look at the site it should rotate between 2 different texts. But if a blocked IP user look at the page will see a specific piece of text.

Just like cloaking but a simple one I can copy into a wordpress blog and it should only change a piece of the site not the hole site.

Something like this but the option to say that if these ips enter the site show ex. nr1 text.


<?
$text[]="1";
$text[]="2";
$text[]="3";
$text[]="4";
$text[]="5";


// Print the random text
echo $text[rand(0,count($text)-1)];


?>

So a IP cloaking script with text rotator.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-08-2009, 08:37 PM
Junior Member
 
Join Date: Nov 2008
Posts: 198
Thanks: 139
Thanked 1,264 Times in 153 Posts
Reputation: 63
iTrader: (1)
Default Re: Text rotator based on IP

You can grap the source IP and display the text in a switch/case statement like below.

Code:
switch ($_SERVER['HTTP_REFERER']){
	case "24.24.24.24":
		echo "whatever for 24.24.24.24"; 
                break;
        case "1.1.1.1":
               echo "whatever for 1.1.1.1";
               break;
	default:
                echo "whatever -  if IP not in above cases";
                break;
}
Hope that helps!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 2 Users Say Thank You to zone69 For This Useful Post:
itmark (01-08-2009), shylesson (01-11-2009)
  #3 (permalink)  
Old 01-08-2009, 10:03 PM
drkenneth's Avatar
Executive VIP
 
Join Date: Nov 2008
Location: USA
Posts: 285
Thanks: 20
Thanked 166 Times in 79 Posts
Reputation: 24
iTrader: (0)
Default Re: Text rotator based on IP

If you wanted to get fancy you could use a SQL backend that logs all visitors and thus is able to rotate the ad each individual IP sees thus maximizing your coverage for the ads. This is also good if you have a large blocked IP list for easy scalability. (So you're not always editing PHP / having a LONG php script. A simple SQL select statement is much faster than a 100 condition php case statement.)
__________________
-DrKenneth
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-08-2009, 10:20 PM
Registered Member
 
Join Date: Aug 2008
Posts: 70
Thanks: 16
Thanked 15 Times in 4 Posts
Reputation: 10
iTrader: (0)
Default Re: Text rotator based on IP

Quote:
Originally Posted by zone69 View Post
You can grap the source IP and display the text in a switch/case statement like below.

Code:
switch ($_SERVER['HTTP_REFERER']){
	case "24.24.24.24":
		echo "whatever for 24.24.24.24"; 
                break;
        case "1.1.1.1":
               echo "whatever for 1.1.1.1";
               break;
	default:
                echo "whatever -  if IP not in above cases";
                break;
}
Hope that helps!
Thanks Man Just what I needed.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Backlinks Genie

SE Nuke



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


SEO Paladin


Web Hosting
Copyright © 2005 - 2012 BlackHatWorld.com All rights reserved.