-
July 12th, 2007, 11:08 AM
#1
PHP script question
I'm trying to include a "ban" script to put on the index page of my website so that a range of IP addresses can't view it. (The sitemeter stats give IP addresses of visitors minus the last octet.) Can anyone tell me whether this is right:
Code:
<? if(strstr($_SERVER['REMOTE_ADDR'] ,"82.30.155.")) { die("<font size=+2><b><center>[message]</font></b></center>"); }?>
to stop, say IP address 82.30.155.70 viewing the page, or whether I need to do something different to place a wildcard for the last octet? I know the basic script is right because I've used it successfully in the past.
Similar Threads
-
By bupati in forum Web Development
Replies: 1
Last Post: February 16th, 2007, 09:44 AM
-
By Irongeek in forum The Security Tutorials Forum
Replies: 8
Last Post: April 27th, 2005, 04:44 PM
-
By SDK in forum Web Security
Replies: 19
Last Post: December 20th, 2004, 05:31 PM
-
By Sevari in forum Web Development
Replies: 3
Last Post: February 25th, 2003, 01:02 AM
-
By Rewandythal in forum Other Tutorials Forum
Replies: 6
Last Post: July 13th, 2002, 02:53 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|