1

Can I detect if user clicked on my site from google chrome or google search and redirect them?

I know that I can detect Chrome user with this function:

if (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false{
//redirect
}

But is it possible to redirect user from other browser that is using google search? Maybe with googlebot IP?

stack
  • 67
  • 7
  • 1
    `$_SERVER['HTTP_REFERER']` it is possible, but browsers make it difficult and it cannot really be trusted. You have more information here: https://stackoverflow.com/questions/12369615/serverhttp-referer-missing – newbie.user88 May 14 '22 at 15:35

0 Answers0