Page 1 of 1

To determine which script filename called it

Posted: Thu May 27, 2004 9:22 am
by anjanesh
There are 3 pages : a.php, b.php, c.php
a.php has a link to c.php
b.php has a link to c.php
Is there any way to find out in c.php which page called it ? Without the use of hidden tags or url paramter. I just need to know the calling script file name.
Thanks

Posted: Thu May 27, 2004 9:28 am
by JayBird
$_SERVER['HTTP_REFERER'] will contain the full full refering URL, which you can then analyze and return the refering page

Mark

Posted: Thu May 27, 2004 12:06 pm
by Weirdan
But keep in mind that some browsers have an option to disable referer tracking. For example, Opera does.

Posted: Thu May 27, 2004 1:19 pm
by feyd
there's the option of (if allowed) opening the access_log and suck out that ip/host's records in the last minute or something.. :) Although this is defeatable, partly, by anonymizers/proxies