View Single Post
  #4 (permalink)  
Old 01-08-2009, 10:20 PM
itmark itmark is offline
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.
Reply With Quote