»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 12-29-2003, 05:30 PM   #1 (permalink)
Registered User
 
golfcart's Avatar
 
Join Date: Oct 2001
Location: Michigan
Posts: 1,680
golfcart is on a distinguished road
Looking for PHP script

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.

golfcart is offline   Reply With Quote
Old 12-29-2003, 05:47 PM   #2 (permalink)
Registered User
 
crouse's Avatar
 
Join Date: Jun 2002
Location: Iowa
Posts: 2,527
crouse is on a distinguished road
Send a message via ICQ to crouse
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
__________________
The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners. --- Author Unknown.
crouse is offline   Reply With Quote
Old 12-29-2003, 05:54 PM   #3 (permalink)
Registered User
 
golfcart's Avatar
 
Join Date: Oct 2001
Location: Michigan
Posts: 1,680
golfcart is on a distinguished road
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
golfcart is offline   Reply With Quote
Old 12-29-2003, 05:56 PM   #4 (permalink)
Registered User
 
crouse's Avatar
 
Join Date: Jun 2002
Location: Iowa
Posts: 2,527
crouse is on a distinguished road
Send a message via ICQ to crouse
Yes....... I do believe you got it
__________________
The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners. --- Author Unknown.
crouse is offline   Reply With Quote
Old 12-29-2003, 06:05 PM   #5 (permalink)
Registered User
 
golfcart's Avatar
 
Join Date: Oct 2001
Location: Michigan
Posts: 1,680
golfcart is on a distinguished road
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
golfcart is offline   Reply With Quote
Old 12-29-2003, 06:38 PM   #6 (permalink)
Registered User
 
Join Date: Jul 2003
Location: Kingwood, TX
Posts: 935
Rand Dusing is on a distinguished road
Send a message via AIM to Rand Dusing
You might want to check hotscripts.com, they have lots of scripts including php.
Rand Dusing is offline   Reply With Quote
Old 12-29-2003, 06:48 PM   #7 (permalink)
Registered User
 
crouse's Avatar
 
Join Date: Jun 2002
Location: Iowa
Posts: 2,527
crouse is on a distinguished road
Send a message via ICQ to crouse
http://www.wlscripting.com/?page=more_info&script_id=10

Costs $3 but would probably be worth $3
__________________
The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners. --- Author Unknown.
crouse is offline   Reply With Quote
Old 12-29-2003, 06:51 PM   #8 (permalink)
Registered User
 
crouse's Avatar
 
Join Date: Jun 2002
Location: Iowa
Posts: 2,527
crouse is on a distinguished road
Send a message via ICQ to crouse
http://www.cleverscripts.com/index.php?a=cleversecure

Free
__________________
The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners. --- Author Unknown.
crouse is offline   Reply With Quote
Old 12-29-2003, 07:03 PM   #9 (permalink)
Registered User
 
golfcart's Avatar
 
Join Date: Oct 2001
Location: Michigan
Posts: 1,680
golfcart is on a distinguished road
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
golfcart is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 12:27 PM.