Kodi nė PHP pėr tė zbuluar shfletuesin e Internetit
Page 1 of 1
Kodi nė PHP pėr tė zbuluar shfletuesin e Internetit
Kėtė kod mund ta pėrdorni pėr tė zbulluar ēfarė shfletuesi ėshtė duke pėrdor vizitori faqes tuaj. Ky kodė mund gjej nėse shfletuesi ėshtė Internet Explorer (IE), Firefox, Opera ose Safari.
- Code:
<?php
$useragent = $_SERVER[HTTP_USER_AGENT']);
if (preg_match(|MSIE ([0-9].[0-9]{1,2})|',$useragent,$matched)) {
$browser_version=$matched[1];
$browser = IE';
} elseif (preg_match( |Opera ([0-9].[0-9]{1,2})|',$useragent,$matched)) {
$browser_version=$matched[1];
$browser = Opera';
} elseif(preg_match(|Firefox/([0-9\.]+)|',$useragent,$matched)) {
$browser_version=$matched[1];
$browser = Firefox';
} elseif(preg_match(|Safari/([0-9\.]+)|',$useragent,$matched)) {
$browser_version=$matched[1];
$browser = Safari';
} else {
// browser not recognized!
$browser_version = 0;
$browser= other';
}
print "Shfletuesi: $browser $browser_version;
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Thu 03 Feb 2022, 02:36 by Naki
» Mbretėreshat e xhudos qė pushtuan botėn dhe sollen 3 medalje tė arta Olimpike
Tue 01 Feb 2022, 01:50 by Naki
» NJERIU DHE NATYRA 2 (LIBĖR BAZĖ)
Mon 31 Jan 2022, 03:06 by Naki
» Kujdes!! Dhuna e prindėrve ndaj fėmijėve rrit rrezikun e sėmundjeve mendore
Mon 31 Jan 2022, 02:58 by Naki
» 4 llojet e bullizmit qė ēdo prind duhet tė njohė
Mon 31 Jan 2022, 02:51 by Naki
» Bullizmi nė shkolla
Mon 31 Jan 2022, 02:40 by Naki
» Kosovari ne Londer
Tue 11 Oct 2016, 00:13 by Naki
» Te doktori...
Tue 11 Oct 2016, 00:13 by Naki
» A e dini pse muaji Shkurt ka 29 ditė ēdo katėr vite?
Sun 13 Mar 2016, 21:46 by ballboy_network
» Mėsoni se sa njerėz nė botė e kanė mbiemrin e juaj
Sun 13 Mar 2016, 21:44 by ballboy_network