Detect user mobile

Started on the old forum in November 2011 · view the original in the archive · old links redirect here

11 replies · 949 views · started 15 years ago · 1 min read

7 participants
usama742 Developer · 74 posts #1

i need php code which detect user mobile

pyramid_raider Developer · 60 posts #2

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];  
?>
arnage Lead · 811 posts #3

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? 🤣

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
something else Fellow · 2,296 posts #4

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

arnage Lead · 811 posts #5

Yep in two topic mate, just in opposite order. 🙂

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
something else Fellow · 2,296 posts #6

Its funny if you google that code you see many different members of coding-talk's names to that function lol

metulj Super moderator Principal · 1,726 posts #7

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ノ刀ノイリ!

arnage Lead · 811 posts #8

Unbelievable that someone could be so incompetent and rude at the same time.

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
kei_ki7 Senior · 431 posts #9

Not new 🙂 many people don't know what their doing.

Did I help you? You can help me too Your donations will help me finance my studies.

pyramid_raider Developer · 60 posts #10

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...

arnage Lead · 811 posts #11

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! 🤪

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
softwarefreak Senior · 349 posts #12

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

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close