1

Track/detect render engine in php file..

Is there a simple php based test that I can apply to decide which browser is being used?

I have tried this code,

print_r( strtolower($_SERVER['HTTP_USER_AGENT']));

but output is,

mozilla/5.0 (x11; ubuntu; linux x86_64; rv:47.0) gecko/20100101 firefox/47.0

and I want Webkit, Safari... browser rendering engine

Please anyone can help me...

Angle.Ŗ
  • 49
  • 2
  • 10

1 Answers1

0

You will have to use a user agent string sniffer to work out the most likely match.

I would suggest using the free API provided by useragentstring.com. as it is kept up to date.

That being said, DON'T use sniffing for feature determination or providing different content. Both of these are bad ideas for a number of reasons.

Community
  • 1
  • 1
MacroMan
  • 2,335
  • 1
  • 27
  • 36