Page 1 of 1
Only allow people from domain.com onto a page....
Posted: Sun Nov 10, 2002 1:10 pm
by DynamiteHost
Hey,
I need this:
Code: Select all
<?
if ($user_is_from_domain.com) {
print "stuff";
}
The website they would be coming from would be domain.com and the script would be on domain.com.... so basically a http_refer thing or sommet :-/
Can anyone give me the code quickly before I go insane?
Thanks

Posted: Sun Nov 10, 2002 1:16 pm
by seg
Code: Select all
<?php
if (strstr($HTTP_REFERER,"domain.com")) {
echo("hello world");
}
?>
Posted: Sun Nov 10, 2002 1:50 pm
by volka
Posted: Sun Nov 10, 2002 1:52 pm
by DynamiteHost
i'm not trying to prevent hotlinking
its for an admin section and i want it to have top security

Posted: Sun Nov 10, 2002 3:45 pm
by volka
but it also checks the referer (which is insecure!!!)
Posted: Sun Nov 10, 2002 3:51 pm
by seg
volka wrote:but it also checks the referer (which is insecure!!!)
Agreed, but as long as that is just one point in a long aragment of security measures, then I'm all for it.
Posted: Sun Nov 10, 2002 4:40 pm
by DynamiteHost
I'm md5 encrypting all passwords, file urls have to be one of a predefined few, sessions are looked for and this...
any i have left out?