if (isset($_SERVER['HTTP_REFERER']) && !preg_match($_SERVER['HTTP_HOST'], $_SERVER['HTTP_REFERER']))
{
echo "Referer: ".$_SERVER['HTTP_REFERER'];
}
i want to check if $SERVER['HTTP_REFERER'] is set and if $SERVER['HTTP_REFERER'] is does not contain $_SERVER['HTTP_HOST'] then i want to echo out the referer.
where am i going wrong is preg_match even the correct function to use? :bemused:
sorry if this is a dumb question, i cant quite get my head round it.