Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

questions regarding referer

Status
Not open for further replies.

cleansedbb

Technical User
Feb 11, 2002
95
US
I am writing a chat script and wanted to avoid a problem I had with my old cgi chat called "ghosting".

I have the script to where you must login with a phpsessionID and it gets your referer. lately though because of norton etc I am not getting a referer?

other than a referer is there a way to make sure the file is called localy?

i.e.
the site is the form method is test.php

but if I copy the <form method=to a local html on my hard drive and excute through IE i can post messages to the chat.

any insight is appreciated!
 
try to check with session, for example only if a person is logged in it has a certain variable such as userName in the _SESSION Variable, so he / she has to log in first. That's if it has some sort of login

Did you try the $_SERVER['HTTP_REFERER'] variable?



Regards,

Namida
 
HTTP_REFERER is an optional header that may or may not be sent by the client. It is non deterministic and cannot be trusted since it is easily faked.
A login system should always include a deterministic way to check if the user is authenticated. The session solution appears to be the most common and I would recommend to implement that instead of relying on optional possibly faked information.
 
yes there is a session with a phpsessID assigned. I will make it compare the data in the database with the login.

Thank you both after playing with this I figured I might have to use the sessions.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top