Tag Archives: HTTP_REFERRER

HTTP_REFERRER in Zend Framework

What is HTTP_REFERRER?

If you need to know how called a PHP script, it is normally setup in the $_SERVER variable of HTTP_REFERRER, or simply

$_SERVER['HTTP_REFERRER'];

but in the same time this does not work the same way in Zend Framework, just because everything is passing by the index.php or a custom bootstrap!

Unfortunately there’s no so many resources online, however there is a solution, which seems to be pretty natural. You can just use this chuck of code:

$this->getRequest()->getHeader('REFERER');

and that’s all!