PDA

Click to See Complete Forum and Search --> : checking


New to VB 6
Nov 26th, 2002, 11:34 AM
I looked in the PHP manual but I could not find anything about checking to see if you reached a page from a certain url.
if it is in the manual then I don't know what to look under.

I there any way to check if a page has been visited from a specific URL.

i.e.

if url = "http://someurl.com/thispage.php

then

some output

else

"You reached this page illeagaly please go back"

The Hobo
Nov 26th, 2002, 12:33 PM
if ($_SERVER['HTTP_REFERER'] == 'http://someurl.com/thispage.php') {

}

But, as the manual says:

The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

And no. There is no alternative.

serg4444
Nov 28th, 2002, 09:40 AM
Also u can read good manual from php.net - they have one at PDF format

Sincerely,
Sergey Booyny
AlarIT programmer
http://www.AlarIT.com

The Hobo
Nov 28th, 2002, 04:26 PM
Originally posted by serg4444
Also u can read good manual from php.net - they have one at PDF format

Sincerely,
Sergey Booyny
AlarIT programmer
http://www.AlarIT.com

...

da_silvy
Nov 29th, 2002, 08:08 AM
i've seen him post that a few times now..

The Hobo
Nov 29th, 2002, 08:34 AM
Same here.