# Using HTTP\_REFERER in Explorer

**URL:** <https://forum.kirupa.com/t/using-http-referer-in-explorer/173637>\
**Category:** Uncategorized\
**Created:** [December 28, 2005, 5:10am UTC](https://forum.kirupa.com/t/using-http-referer-in-explorer/173637 "2005-12-28T05:10:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![orleel](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/orleel/32/1258_2.png) [@orleel](https://forum.kirupa.com/u/orleel)\
**Post date:** [December 28, 2005, 5:10am UTC](https://forum.kirupa.com/t/using-http-referer-in-explorer/173637/1 "2005-12-28T05:10:55Z")

</div>

HELP! I have been trying to implement a PHP solution that will limit access to a particular web page \<content.php\> unless someone has agreed to the terms of the conditions page \<conditions.html\> I have tried using the HTTP\_REFERER command but I run into difficulties when I implement the script in Explorer. The script works fine in Netscape though.

Could someone please look at the following and provide some insight as to what I might be doing wrong?

Thanks in advance!  
\<?php  
$from = $\_SERVER[‘HTTP\_REFERER’];

if ($from != “[http://www.site.com/conditions.html](http://www.site.com/conditions.html)”)

{print(" Sorry you have tried to link to a page which does not accept visitors directly. \<br\>  
\<a href=http://www.site.com/conditions.html\>CLICK HERE\</a\> to enter");  
exit;}  
?\>
