Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8170449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:07:58+00:00 2026-06-06T21:07:58+00:00

$agent = $_SERVER[‘HTTP_USER_AGENT’]; if(preg_match(‘/iPhone/i’, $agent)){ echo You’re using Iphone; } else if(preg_match(‘/Android/i’, $agent)){ echo

  • 0

$agent = $_SERVER['HTTP_USER_AGENT'];

if(preg_match('/iPhone/i', $agent)){
    echo "You're using Iphone";
} else if(preg_match('/Android/i', $agent)){
    echo "You're using Iphone";
} else if(preg_match('/Blackberry/i', $agent)){
    echo "You're using Blackberry";
}

How to ideas when run a mobile is how model name, ex: Iphone => show model is Iphone 4S

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:07:59+00:00Added an answer on June 6, 2026 at 9:07 pm

    You can do that by using library called WURFL.

    This this, you can just easily do:

    $user_agent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 800)";
    $requestingDevice = $wurflManager->getDeviceForUserAgent($user_agent);
    $is_wireless = ($requestingDevice->getCapability('is_wireless_device') == 'true');
    $is_smarttv = ($requestingDevice->getCapability('is_smarttv') == 'true');
    $is_tablet = ($requestingDevice->getCapability('is_tablet') == 'true');
    $is_phone = ($requestingDevice->getCapability('can_assign_phone_number') == 'true');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If am using $_SERVER['HTTP_USER_AGENT']; to detect if the browser is a mobile browser or
I have this small code using SQL Server Agent to Run a Remote Package
I know I can get the user ip: $_SERVER['HTTP_CLIENT_IP']; the user user's agent: $_SERVER['HTTP_USER_AGENT'];
How to you automate SQL Server 2000 incremental backups using SQL Server Agent and
I coded an agent in Java that displays some text using JDialogBox. Now for
If the user-agent includes the word myapp, then alert('hi'); BTW, I am using JQuery.
How can I determine from code, if SQL Server Agent is running - using
I found this answer using xp_cmdshell SQL Server Agent Job - Export results to
Is it possible to run an SSIS package from a sql server agent job
I'm trying to create an automated job for the SQL Server Agent to run.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.