PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
DynamiteHost
Forum Commoner
Posts: 69 Joined: Sat Aug 10, 2002 5:33 pm
Post
by DynamiteHost » Sun Nov 10, 2002 1:10 pm
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
seg
Forum Commoner
Posts: 38 Joined: Thu Oct 31, 2002 12:08 pm
Location: Northern, VA
Contact:
Post
by seg » Sun Nov 10, 2002 1:16 pm
Code: Select all
<?php
if (strstr($HTTP_REFERER,"domain.com")) {
echo("hello world");
}
?>
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Sun Nov 10, 2002 1:50 pm
DynamiteHost
Forum Commoner
Posts: 69 Joined: Sat Aug 10, 2002 5:33 pm
Post
by DynamiteHost » Sun Nov 10, 2002 1:52 pm
i'm not trying to prevent hotlinking
its for an admin section and i want it to have top security
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Sun Nov 10, 2002 3:45 pm
but it also checks the referer (which is insecure!!!)
seg
Forum Commoner
Posts: 38 Joined: Thu Oct 31, 2002 12:08 pm
Location: Northern, VA
Contact:
Post
by seg » Sun Nov 10, 2002 3:51 pm
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.
DynamiteHost
Forum Commoner
Posts: 69 Joined: Sat Aug 10, 2002 5:33 pm
Post
by DynamiteHost » Sun Nov 10, 2002 4:40 pm
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?