2010-04-08, 12:35:10
This worked perfectly. Thank you.
I think there is an extra ')' in the second if. Should read.
I think there is an extra ')' in the second if. Should read.
Code:
// check form referrer - needs siteurl and edit.php in it.
if (isset($_SERVER['HTTP_REFERER'])) {
if ( !(strpos(str_replace('http://www.', '', $SITEURL), $_SERVER['HTTP_REFERER']) === false) || !(strpos("edit.php", $_SERVER['HTTP_REFERER']) === false)) {
echo "<b>Invalid Referer</b><br />-------<br />";
echo 'Invalid Referer: ' . $_SERVER['HTTP_REFERER'];
die;
}
}