Northern Flame Posted August 4, 2007 Share Posted August 4, 2007 I have a wap website and I want to use PHP on it, but when I tried that it gave me an error message on my phone saying "Unsupported Content Type" is their a way to use PHP on a wap site? Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/ Share on other sites More sharing options...
Northern Flame Posted August 4, 2007 Author Share Posted August 4, 2007 does anyone know? Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315663 Share on other sites More sharing options...
dbo Posted August 4, 2007 Share Posted August 4, 2007 Hrmmm. This is an interesting question. I've personally not done any WAP stuff, but have considered it in the past. What if you echo'd a header that told the php to act as the appropriate mime type? This could potentially "trick" the phone into thinking it's really a wap page. Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315668 Share on other sites More sharing options...
Northern Flame Posted August 4, 2007 Author Share Posted August 4, 2007 no i've tried that before, it still wont work, all i really want to do is display some ringtones that are in my MySQL database and using pagination.... can this be done without PHP? Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315671 Share on other sites More sharing options...
dbo Posted August 4, 2007 Share Posted August 4, 2007 You'll have to have some way to query the database... and php is as good as any way. I'm almost positive that the workaround you'll need is for echoing the appropriate header. I've done this in the past to tell a certain page to act as image/png for example. I did a quick search for wap mime and php and got several articles. I wish I could tell you exactly but I'm sure that it'd work... on another note there are some free wap phone emulator sites out there that will let you test wap sites. Finding one of these will probably make testing easier for you. Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315673 Share on other sites More sharing options...
Northern Flame Posted August 4, 2007 Author Share Posted August 4, 2007 alright well thanks for the advice, i guess ill go on google and look for one of these so that I can test my wap site Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315676 Share on other sites More sharing options...
dbo Posted August 4, 2007 Share Posted August 4, 2007 Keep me posted. I'm interested in the solution. Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315678 Share on other sites More sharing options...
Northern Flame Posted August 4, 2007 Author Share Posted August 4, 2007 this did the trick  <?php header('Content-type: application/vnd.wap.xhtml+xml'); ?> <?php echo '<?xml version="1.0"?'.'>'; ?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315689 Share on other sites More sharing options...
dbo Posted August 4, 2007 Share Posted August 4, 2007 WOOT! Grats man. Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315690 Share on other sites More sharing options...
Northern Flame Posted August 4, 2007 Author Share Posted August 4, 2007 yea and it worked out better than i though, becuase i also wanted my wap site only to be viewable to a mobile phone and not a computer, so when i try to access that page with a computer it doesnt view it, but with a phone it works fine Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315691 Share on other sites More sharing options...
dbo Posted August 4, 2007 Share Posted August 4, 2007 Nice did you find one of those emulators I mentioned? Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315692 Share on other sites More sharing options...
Northern Flame Posted August 4, 2007 Author Share Posted August 4, 2007 no i went straight to looking for the headers Quote Link to comment https://forums.phpfreaks.com/topic/63287-solved-php-wap/#findComment-315703 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.