PHP On mobile (Getting mobile model number)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • udaypawar
    New Member
    • Feb 2007
    • 29

    PHP On mobile (Getting mobile model number)

    Hi All,

    I am developing a mobile application using PHP and XHTML for mobile.

    In this application I am just counting number of downloads and after each hit I am making an entry in Mysql database. Its working fine up to this point.

    Next I want is my "Java application" which I am allowing users to download should get downloaded only on supported handsets. I don't know how to identify the Model Number of mobile handset which is accessing my page.

    Can any one help me on this?

    Thanks in advance.
    Last edited by udaypawar; May 27 '08, 07:11 AM. Reason: Title was not proper
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Oh, thats a never thought about and never expected question.

    So, do one thing. Save a PHP file as [php]echo "<pre>";
    print_r($_ENV);
    echo "<pre>";[/php]on the server and open it in the mobile's browser.
    See if there's any valid information for you.

    Comment

    • udaypawar
      New Member
      • Feb 2007
      • 29

      #3
      I have already tried the same.

      I can fetch the mobile model number from the HTTP_USER_AGENT string. I have tested it successfully in Nokia N70 and SonyEricssonK75 0i. In both cases I can get "NokiaN70-1/3.0546.2.3 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1" and "SonyEricssonK7 50i/R1L Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1" as a HTTP_USER_AGENT strings respectively.

      But the problem is yet in Nokia E50 mobile with Symbian OS I cant get the model number included because its uing Firefox as web browser. The string I got is "Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413 es50".

      I am unable to find any full proof method to detect mobile model number.

      If there is any way by which I can fetch model number then let me know.

      Comment

      Working...