Detect user mobile
Started on the old forum in November 2011 · view the original in the archive · old links redirect here
Use this code to detect browsers
<?
function raider_real_ua()
{
//GET REAL DEVICE USER AGENT
$keyname_ua_arr = array('HTTP_X_DEVICE_USER_AGENT', 'HTTP_X_OPERAMINI_PHONE_UA','HTTP_X_BOLT_PHONE_UA', 'HTTP_X_MOBILE_UA', 'HTTP_USER_AGENT');
foreach ($keyname_ua_arr as $keyname_ua) {
if (!empty($_SERVER[$keyname_ua])) {
return $_SERVER[$keyname_ua]; //REAL UA
break;
}
}
}
$short = explode(' ', raider_real_ua());
echo ''.$short[0];
?>
pyramid_raider wrote: Use this code to detect browsers
<? function raider_real_ua() { //GET REAL DEVICE USER AGENT $keyname_ua_arr = array('HTTP_X_DEVICE_USER_AGENT', 'HTTP_X_OPERAMINI_PHONE_UA','HTTP_X_BOLT_PHONE_UA', 'HTTP_X_MOBILE_UA', 'HTTP_USER_AGENT'); foreach ($keyname_ua_arr as $keyname_ua) { if (!empty($_SERVER[$keyname_ua])) { return $_SERVER[$keyname_ua]; //REAL UA break; } } } $short = explode(' ', raider_real_ua()); echo ''.$short[0]; ?>
Nice code, u wrote it yourself? 🤣
pyramid_raider wrote: Use this code to detect browsers
<? function raider_real_ua() { //GET REAL DEVICE USER AGENT $keyname_ua_arr = array('HTTP_X_DEVICE_USER_AGENT', 'HTTP_X_OPERAMINI_PHONE_UA','HTTP_X_BOLT_PHONE_UA', 'HTTP_X_MOBILE_UA', 'HTTP_USER_AGENT'); foreach ($keyname_ua_arr as $keyname_ua) { if (!empty($_SERVER[$keyname_ua])) { return $_SERVER[$keyname_ua]; //REAL UA break; } } } $short = explode(' ', raider_real_ua()); echo ''.$short[0]; ?>
funny how functions get renamed 😉 http://coding-talk.com/f46/detect-real-user-agent-9986/
arnage wrote: Nice code, u wrote it yourself? 🤣
I didnt see your post arnage .... we was thinking the same thing lol
Its funny if you google that code you see many different members of coding-talk's names to that function lol
something else wrote: Its funny if you google that code you see many different members of coding-talk's names to that function lol
this function will soon get as many ''copyrights'' as lava script LMFAO !
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
sue me for changing copyrights or function name for that code lol.. if u want to share ur copyrigted codes than encrypt them before sharing else dont claim copyrights...
pyramid_raider wrote: sue me for changing copyrights or function name for that code lol.. if u want to share ur copyrigted codes than encrypt them before sharing else dont claim copyrights...
It's not just gay this is stupid! 🤪
pyramid_raider wrote: sue me for changing copyrights or function name for that code lol.. if u want to share ur copyrigted codes than encrypt them before sharing else dont claim copyrights...
Bro.you're wrong somewhere...the people who shares doesn't ask for money but just their name as copyrights at the footer(not as 400*400 banners) I guess we can & we must give them the respect for their hard work of sleepless nights,hope you understand now.
I need some facebook likes, can you please help me 🤝 http://facebook.com/softwarefreakin I noticed social media is really powerful 🧙 Well DONE is better than well SAID
