Its a reserved variable in PHP. The element HTTP_REFERRER will display the referring url. More info can be found @ http://in.php.net/manual/en/reserved.variables.server.php
It's hard to understand, what you want to solve, but - instead of using $_SERVER['HTTP_REFFERER'], u can try JavaScript ( check history length + last entry ).
What do you mean by is there any script = $_SERVER['HTTP_REFERER'];? $_SERVER['HTTP_REFERER'] shows the website that refer the visitor to your page. - ads2help
$_SERVER['HTTP_REFERER'] is one of the server variable in php. This variable return the url of previous page(that means navigated pae).
some programmers use this reserve variable to return back to last page visited, after sending a form value to another page. The visitor will not trying to find the last visited page.