×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    9

    Serving colour/non-colour pictures based on phone capabilities

    Hi. I need a script that can detect if a mobile phone is able to read colour (jpg, gif)/black and white (wbmp) graphics so i can serve pictures based on whether the phone can read those file types.

    Is there anyone who knows how this can be done? Thanks.

  2. #2
    Super Contributor
    Join Date
    May 2003
    Posts
    839
    Hello!

    From phones UAProf file you can check what the phone support.

    -Tum-

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    23
    You can try to read the environment variable HTTP_ACCEPT.
    In this Variable the browser should list all suported MIME Types.
    i.e:
    HTTP_ACCEPT 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*'

  4. #4
    Registered User
    Join Date
    Apr 2004
    Posts
    9
    Thanks. I am able to read the HTTP_ACCEPT header. However I notice that some monochrome phones also accept .gif format. Do you know how I can differentiate a monochrome phone browser from a colour one from the HTTP_ACCEPT header information?

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    23
    No I don't think so.
    But you might check the HTTP_USER_AGENT variable and check it against a list of capabilities.
    On comprehensive list is the WURFL.xml
    You will find it at www.wurfl.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •