View Single Post
  #2 (permalink)  
Old 01-08-2009, 08:37 PM
zone69 zone69 is online now
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!
Reply With Quote
The Following 2 Users Say Thank You to zone69 For This Useful Post:
itmark (01-08-2009), shylesson (01-11-2009)