Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Domain Name/URL extract
09-24-2005, 10:49 PM #1
- Join Date
- Jun 2005
- Thanked 0 Times in 0 Posts
Domain Name/URL extract
Hello Dear Friends,
I'm facing a problem with PHP programming to complete my email application.
I want visitors to be restricted to use my email form via various locations.
i.e, I want to ALLOW some predefined URL (saved in database)
$refer = $_SERVER['SERVER_NAME'];
it doesn't solve the problem.
can anybody please let me know the exact code or snippet to be used for such purpose?
Thanks & Best Regards
09-25-2005, 04:11 AM #2
- Join Date
- Jun 2002
- Winona, MN - The land of 10,000 lakes
- Thanked 45 Times in 42 Posts
Try something like this...
I may have the arguments backward in the in_array() function (I can never remember that stuff - www.php.net is your friend).PHP Code:
$validURIs = array("www.xyz.com","www.abc.com"); //you could populate this with a database query
09-25-2005, 04:27 AM #3
You are like me, I could never remember until I forced myself... Yes though, you do have them the right way round ... i can recite that page of the php.net manual now lol :P...