Is there a way that I could make my ads appear for everyone except for 2 to 3 people?
| SitePoint Sponsor |
Yeah. Just don't display the code if the IP is X or X.
- Nathan
You can use $_SERVER['REMOTE_ADDR'] to get the IP address, and then just go if ($_SERVER['REMOTE_ADDR'] != '123.123.123.123') { ...ad code... }.
- Nathan




You can also use a .htaccess file with:
That will block these IPs from your whole server if you create this .htaccess file in the root directory.order allow,deny
deny from IP1
deny from IP2
deny from IP3
allow from all




You got me thereOriginally Posted by uni
Then the php method should do the trick, as told above.
Bookmarks