home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Looking for PHP script

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1373
Discussions: 200,928, Posts: 2,379,142, Members: 246,295
Old December 29th, 2003, 08:30 PM   Digg it!   #1 (permalink)
Ultimate Member
 
golfcart's Avatar
 
Join Date: Oct 2001
Location: Michigan
Posts: 1,769
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 December 29th, 2003, 08:47 PM     #2 (permalink)
Ultimate Member
 
crouse's Avatar
 
Join Date: Jun 2002
Location: Iowa
Posts: 2,879
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
__________________
USA Linux Users Group
OpenSUSE.us
crouse is offline   Reply With Quote
Old December 29th, 2003, 08:54 PM     #3 (permalink)
Ultimate Member
 
golfcart's Avatar
 
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
golfcart is offline   Reply With Quote
Old December 29th, 2003, 08:56 PM     #4 (permalink)
Ultimate Member
 
crouse's Avatar
 
Join Date: Jun 2002
Location: Iowa
Posts: 2,879
Send a message via ICQ to crouse
Yes....... I do believe you got it
crouse is offline   Reply With Quote
Old December 29th, 2003, 09:05 PM     #5 (permalink)
Ultimate Member
 
golfcart's Avatar
 
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
golfcart is offline   Reply With Quote
Old 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.
Rand Dusing is offline   Reply With Quote
Old December 29th, 2003, 09:48 PM     #7 (permalink)
Ultimate Member
 
crouse's Avatar
 
Join Date: Jun 2002
Location: Iowa
Posts: 2,879
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
crouse is offline   Reply With Quote
Old December 29th, 2003, 09:51 PM     #8 (permalink)
Ultimate Member
 
crouse's Avatar
 
Join Date: Jun 2002
Location: Iowa
Posts: 2,879
Send a message via ICQ to crouse
crouse is offline   Reply With Quote
Old December 29th, 2003, 10:03 PM     #9 (permalink)
Ultimate Member
 
golfcart's Avatar
 
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
golfcart is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2867)
Obama the Muslim (14)
Is the PSU I received dead? (10)
windows vista security holes (9)
HIS HD5770 graphic card question (15)
Foreign voltage (10)
Print spooler problem (13)
Install XP pro and a Vista laptop ?.. (10)
Dept. of HS: NSA 'Helped' Develop V.. (15)
A good PSU? (10)
Ideal cheap graph card for PC-Gamin.. (15)
New Computer wont recognize XP disc (7)
EVGA 9800 gtx help with finding a g.. (8)
World's largest Monopoly Game using.. (331)
Recent Discussions
Regular Build (2)
Graphics Card Upgrade Question (0)
Fire in DVD (2)
Modern Warfare For the PC (33)
radeon x850xt platinum & shader 3 (3)
Have you switched yet? (84)
Install XP pro and a Vista laptop ?? (10)
Wireless Router+Cable Modems and Much.. (0)
Optical Audio A-B Switch (1)
windows vista security holes (9)
The NTDVM CPU has encountered an ille.. (24)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (34)
Wireless speakers for PC? (11)
Print spooler problem (13)
Help getting around port 80 for camer.. (2)
Display shows 3x5 inch in middle of s.. (3)
monitor will not turn on at all, (1)
World's largest Monopoly Game using G.. (331)
Foreign voltage (10)
FiOS modem/router interfering with ne.. (7)
Browsers wont load websites (2)
Virus Doctor Popup? (1)
Dept. of HS: NSA 'Helped' Develop Vis.. (15)
EVGA 9800 gtx help with finding a goo.. (8)
Problem with speed step/turbo boost? (1)


All times are GMT -4. The time now is 03:08 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28