Make use of strpos()
here
$ref = $_SERVER['HTTP_REFERER'];
if(strpos($ref,'http://hi.com'))
{
echo "found";
}
Pergunta
i need to use
$ref = $_SERVER['HTTP_REFERER'];
if($ref !== 'http://hi.com')
have is problem is if traffic come from http://hi.com/something condition become not true. how to test only top level domain ? thanks
Solução
Make use of strpos()
here
$ref = $_SERVER['HTTP_REFERER'];
if(strpos($ref,'http://hi.com'))
{
echo "found";
}