Reputation: 40799
How to detect dolphin browser in php? Unfortunatly I don't have android, so I can't check the dolphin browser's user agent.
thanks in advance,
Upvotes: 2
Views: 2646
Reputation: 1169
On my version of Dolphin, 8.8.2 - running on a Samsung Galaxy Note, there is no particular user agent and 'desktop' is set. The user-agent is set by tapping on More -> Settings -> User Agent. I am then able to change the user agent to any of the following:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16
So if you're trying to deliver content specific to the Dolphin browser in PHP you could test if 'mobi' or 'Android' is present in the user agent. If you're trying to detect that the exact browser being used is Dolphin then that will be tricky unless your client device's custom user-agent is set.
Upvotes: 2
Reputation: 1840
You can check the User Agent
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'dolphin') !== false) {
echo 'Your UA is Dolphin';
}
User Agent
, but I assumed that if it contains the word dolphin
is accurate enough.Upvotes: -6