Looking for PHP script  | |
December 29th, 2003, 08:30 PM
|
#1 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Michigan
Posts: 1,769
|
I need a script that will grab the IP of the remote user and check it against an included text file list of IP addresses. If the IP matches one on the list, I want it to forward to another page.
If anybody would like to write this or help me write this, we can post it hear for others to use if they want  Thanks. |
| |
December 29th, 2003, 08:47 PM
|
#2 (permalink)
| | Ultimate Member
Join Date: Jun 2002 Location: Iowa
Posts: 2,879
|
Using apache or a .htaccess file for apache .
Order Deny,Allow
Deny from all
Allow from 123.45.6.7
You could create a link on say page 1 to page2 (located in a subdirectory with the .htaccess file in it) .. then when the link is clicked, you are either denied by the apache server or allowed in. The above lets ip address 123.45.6.7 pass to page 2 ..... all other ip addresses are denied access.
This assumes of course that you use the APACHE web server
HTH's |
| |
December 29th, 2003, 08:54 PM
|
#3 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Michigan
Posts: 1,769
|
So would this work too?
Order Allow,Deny
Allow from all
Deny from 123.45.6.7
I want the world to be able to see the page and a select few to get denied. I'm getting alot of email harvesting bots on my site and would like to forward them to a big "Go away" page  I was even thinking of making a page with a list of known spammer addresses on it for the bots to get forwarded to  |
| |
December 29th, 2003, 08:56 PM
|
#4 (permalink)
| | Ultimate Member
Join Date: Jun 2002 Location: Iowa
Posts: 2,879
|
Yes....... I do believe you got it  |
| |
December 29th, 2003, 09:05 PM
|
#5 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Michigan
Posts: 1,769
|
Thanks crouse it works great  I used my own IP to test it. If anybody knows how to do the same thing in PHP, I would still like to play around with that. This will work great for the time being though  |
| |
December 29th, 2003, 09:38 PM
|
#6 (permalink)
| | Ultimate Member
Join Date: Jul 2003
Posts: 1,253
|
You might want to check hotscripts.com, they have lots of scripts including php. |
| |
December 29th, 2003, 09:48 PM
|
#7 (permalink)
| | Ultimate Member
Join Date: Jun 2002 Location: Iowa
Posts: 2,879
| |
| |
December 29th, 2003, 09:51 PM
|
#8 (permalink)
| | Ultimate Member
Join Date: Jun 2002 Location: Iowa
Posts: 2,879
| |
| |
December 29th, 2003, 10:03 PM
|
#9 (permalink)
| | Ultimate Member
Join Date: Oct 2001 Location: Michigan
Posts: 1,769
|
Thanks crouse. Both of those look great. I am going to rework the free one to do exactly what I want. The first site you posted has some other neat scripts too and some of them are free  |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |