Black Hat Forum
Go Back   Black Hat Forum > Black Hat SEO > Cloaking and Content Generators

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

Search
 
Do NOT buy anything from MASS PM Messages Asking you to buy IMA Products YOU HAVE BEEN WARNED!! (If you have REFUND IMMEDIATELY)
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-08-2009, 06:56 PM
Newbie
 
Join Date: Aug 2008
Posts: 49
Reputation: 10
itmark is on a distinguished road
Thanks: 11
Thanked 3 Times in 3 Posts
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

Make Money!

  #2 (permalink)  
Old 01-08-2009, 07:37 PM
zone69's Avatar
Junior Member
 
Join Date: Nov 2008
Posts: 157
Reputation: 24
zone69 is on a distinguished road
Thanks: 124
Thanked 344 Times in 97 Posts
iTrader: (0)
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, 09:03 PM
drkenneth's Avatar
No, I'm not a doctor.
 
Join Date: Nov 2008
Location: USA
Posts: 186
Reputation: 15
drkenneth is on a distinguished road
Thanks: 5
Thanked 67 Times in 39 Posts
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, 09:20 PM
Newbie
 
Join Date: Aug 2008
Posts: 49
Reputation: 10
itmark is on a distinguished road
Thanks: 11
Thanked 3 Times in 3 Posts
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

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

Forum Jump






Sitemap: 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