Quote:
Originally Posted by SaN-DeeP
call me a noob but how to test if server sets the HTTP referer field ?
|
Copy this code to a file called reftest.php and upload it to your server, then browse to the file and click the button on the page.
PHP Code:
<?php
if (!empty($_POST['do']))
{
if ($_SERVER['HTTP_REFERER'] != '')
{
echo "<p>Your HTTP referrer is <em>$_SERVER[HTTP_REFERER]</em>.</p>";
}
else
{
echo "<p>Your server does not appear to set an HTTP referrer. Oh dear.</p>";
}
}
?>
<form action="reftest.php" method="post">
<input type="hidden" name="do" value="moo" />
<input type="submit" value="Click me" />
</form>