Mobile Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreMobile Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 10th, 2007, 05:19 AM
jojoba's Avatar
jojoba jojoba is offline
I love your chinese eyes :*
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2006
Location: Her heart... she claims!
Posts: 1,587 jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jojoba User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 10 h 52 m 35 sec
Reputation Power: 453
XHTMLMP - Set reading wbmp image instead of jpeg and gif

Hi

I have written a code to first check the mobile browser ability if it can display gif or jpeg then to show those images otherwise to show wbmp images. When i browser site with my Nokia N70 i see wbmp images but it must display gif and jpeg images because N70 has support for these types and i can browse other sites like google to see coloured pictures.

here is the code i am using

PHP Code:
if ( stristr($_SERVER['HTTP_ACCEPT'], "image/gif") || stristr($_SERVER['HTTP_ACCEPT'], "image/jpg") || stristr($_SERVER['HTTP_ACCEPT'], "image/png") )
{
?>
  <img src="images/logo.gif" alt="logo" height="87" width="80" />
<?php
}
else
{
 
?>
   <img src="images/logo.wbmp" alt="logo" height="87" width="80" />
 <?php



also when i browse the same site on online emulator for N70 (from Jabba sticky) it displays coloured pictures and not wbmp but when i browse from my N70 it displays wbmp image.

what could be the best code to check the handset browser ability and then decide the image format?


thanks

Reply With Quote
  #2  
Old August 10th, 2007, 06:49 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Click here for more information.
 
Join Date: Feb 2002
Location: Finland
Posts: 8,910 jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 4 Weeks 1 Day 10 h 15 m 4 sec
Reputation Power: 1693
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Perhaps the N70 accepts */* (the "all" setting ) - see internet explorers results?
What does a print_r on $_SERVER['HTTP_ACCEPT '] return for the phone?

You code looks OK, so I don't know off hand why it doesn't work...
however if you are only displaying a gif, just check for gif support.

Maybe strpos or stripos would be more suited than stristr in the current scenario.

Perhaps it has something to do with the image itself -
maybe too many colors?
__________________
Cheers,

Jamie

# mdb4u | mobile movie database] | Please help to test and promote
# skiFFie | Home of the 'accessibility module' for Drupal
# Jamie Burns [me] Accessibility Module [drupal]
# guidelines | search | wap resources | not getting help | fold to cure

__________________

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.



__________________

Last edited by jabba_29 : August 10th, 2007 at 09:06 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreMobile Programming > XHTMLMP - Set reading wbmp image instead of jpeg and gif


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT