Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
EDC:
Download extensions for Elxis CMS
.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
browser detection
« previous
next »
Print
Pages: [
1
]
Author
Topic: browser detection (Read 4863 times)
xmanhattan
Hero Member
Posts: 1235
If I'm still breathing, I'm doing something!
browser detection
«
on:
September 22, 2012, 13:41:00 »
Hello all,
I have a small problem with jquery and opera. I would like to know what is the php code to use to detect opera to add a small javascript routine.
Logged
Bournias.net
webgift
Elxis Team
Hero Member
Posts: 4193
Re: browser detection
«
Reply #1 on:
September 22, 2012, 15:03:23 »
You can simply use
stripos
function of php and global $_SERVER variable like this:
if (stripos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false) {
echo 'You use Opera browser!';
}
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
xmanhattan
Hero Member
Posts: 1235
If I'm still breathing, I'm doing something!
Re: browser detection
«
Reply #2 on:
September 22, 2012, 15:46:29 »
Ouch, I didn't even think of that. I thought that there might be a special function.
Thanks
Logged
Bournias.net
webgift
Elxis Team
Hero Member
Posts: 4193
Re: browser detection
«
Reply #3 on:
September 22, 2012, 15:49:49 »
You are welcome, Peter!
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
browser detection