Jump to content

Recommended Posts

[url=http://php.net/get_browser]get_browser[/url] is an option too.

And yeah, HTTP_REFERER (and HTTP_USER_AGENT too) is [i]very[/i] easy to spoof, but there is no spoof-proof way of getting the user agent. It works in the way that the browser actually sends the information along with the request, and you can modify what it sends quite easily.
Link to comment
https://forums.phpfreaks.com/topic/14138-browser-detection/#findComment-55408
Share on other sites

Like I said, it's as reliable as the browser sending the headers.  When I wrote a C++ crawler, I sent a user agent header that corresponded with my crawler.  It is very easy to spoof, but under what circumstances are you testing this other than javascript?  Sometimes it can actually be better to detect within JavaScript, since JS would have been already downloaded.  Even better, detect with both!
Link to comment
https://forums.phpfreaks.com/topic/14138-browser-detection/#findComment-55661
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.