boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

b2wap.php hack
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
plazz2000



Joined: 01 Apr 2002
Posts: 40
Location: Cork, Ireland

PostPosted: Sun Sep 29, 2002 2:22 pm    Post subject: b2wap.php hack Reply with quote

I haven't had a chance to try this out on a WAP phone yet, but it should show the latest x number of posts from b2.

Maybe someone could install it and try it out for me?

Download b2wap.php
Back to top
View user's profile Send private message
GamerZ



Joined: 15 May 2002
Posts: 537
Location: Singapore

PostPosted: Sun Sep 29, 2002 2:57 pm    Post subject: Reply with quote

hmm cannot, i am not to good in wap, but i get File Format Unknown on my nokia 8310(Asian)

When i open with ie i also got error
_________________

++ GamerZ.Per.Sg - Complex Simplicity
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
plazz2000



Joined: 01 Apr 2002
Posts: 40
Location: Cork, Ireland

PostPosted: Sun Sep 29, 2002 3:42 pm    Post subject: Reply with quote

Hmmm..

Try replacing
Code:
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">


with just
Code:
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN">


or change:
<?php echo "<?xml version=\"1.0\"?".">"; ?>
to
<?xml version="1.0"?>

This seems to have an effect on IE, I don't know about on phones.
Back to top
View user's profile Send private message
GamerZ



Joined: 15 May 2002
Posts: 537
Location: Singapore

PostPosted: Sun Sep 29, 2002 3:58 pm    Post subject: Reply with quote

hmm works on IE but not on my phone wierd

do u have any sites tt have a wap address so tt i could use it to test?
_________________

++ GamerZ.Per.Sg - Complex Simplicity
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
plazz2000



Joined: 01 Apr 2002
Posts: 40
Location: Cork, Ireland

PostPosted: Sun Sep 29, 2002 5:05 pm    Post subject: Reply with quote

My b2 wap site is http://eirways.com/citynet/wap.php

I don't know if the files must have a .wml extension or if .php is okay.
Back to top
View user's profile Send private message
plazz2000



Joined: 01 Apr 2002
Posts: 40
Location: Cork, Ireland

PostPosted: Sun Sep 29, 2002 5:32 pm    Post subject: 1.0.1 Reply with quote

I've updated it to fix a few small changes.

It looks at it should in IE (XML formatted) and it looks grand in the WAP emulator at gelon.net as well.

Download b2wap.php
Back to top
View user's profile Send private message
GamerZ



Joined: 15 May 2002
Posts: 537
Location: Singapore

PostPosted: Mon Sep 30, 2002 5:17 am    Post subject: Reply with quote

plazz2000 wrote:
My b2 wap site is http://eirways.com/citynet/wap.php

I don't know if the files must have a .wml extension or if .php is okay.
i try to reanme it to wml when i get home after school
_________________

++ GamerZ.Per.Sg - Complex Simplicity
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
plazz2000



Joined: 01 Apr 2002
Posts: 40
Location: Cork, Ireland

PostPosted: Mon Sep 30, 2002 8:03 am    Post subject: Reply with quote

If you rename it to .wml, the PHP parts of the file won't work, so it must be PHP.

But some phones might only open .wml files, I don't know.
Back to top
View user's profile Send private message
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Tue Oct 01, 2002 12:41 am    Post subject: Reply with quote

It's not the filename (extension) that determines the type, it is the MIME type sent in the html header before the file.

So you need to send
Content-Type: text/vnd.wap.wml

<?php header('Content-Type: text/vnd.wap.wml'); ?> at the beginning of you php file.

This must be before ANY other output incuding whitespace.

Hope this helps,
Mike
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
imeridian



Joined: 12 Feb 2002
Posts: 191

PostPosted: Tue Oct 01, 2002 11:36 am    Post subject: Reply with quote

One can also change the mimetype via .htaccess on Apache powered servers, this is the same thing that allows for the "archives" file to be parsed as php with the forward slash querystring options.
Back to top
View user's profile Send private message Visit poster's website
GamerZ



Joined: 15 May 2002
Posts: 537
Location: Singapore

PostPosted: Tue Oct 01, 2002 1:02 pm    Post subject: Reply with quote

mikelittle wrote:
It's not the filename (extension) that determines the type, it is the MIME type sent in the html header before the file.

So you need to send
Content-Type: text/vnd.wap.wml

<?php header('Content-Type: text/vnd.wap.wml'); ?> at the beginning of you php file.

This must be before ANY other output incuding whitespace.

Hope this helps,
Mike
hmm i get a bad ans from orgin server error msg on my fone
_________________

++ GamerZ.Per.Sg - Complex Simplicity
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
GamerZ



Joined: 15 May 2002
Posts: 537
Location: Singapore

PostPosted: Tue Oct 01, 2002 1:02 pm    Post subject: Re: 1.0.1 Reply with quote

plazz2000 wrote:
I've updated it to fix a few small changes.

It looks at it should in IE (XML formatted) and it looks grand in the WAP emulator at gelon.net as well.

Download b2wap.php
link down
_________________

++ GamerZ.Per.Sg - Complex Simplicity
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
plazz2000



Joined: 01 Apr 2002
Posts: 40
Location: Cork, Ireland

PostPosted: Tue Oct 01, 2002 2:33 pm    Post subject: 1.0.3 Reply with quote

GamerZ, the file should be up now (and updated)

Mikelittle, thanks for the tip. I've added that line and it seems to make it work in the Gelon.net WAP emulator.

Download b2wap.php (Version 1.0.3)
Back to top
View user's profile Send private message
amcd



Joined: 05 Apr 2002
Posts: 16
Location: Scotland

PostPosted: Wed Oct 02, 2002 12:33 pm    Post subject: Reply with quote

Been playing with this code using the downloadable emulator from http://www.m3gate.com as it seems this emulator is a much better validator than gelon.net

It moans that you're not allowed free text outside of elements,
so in other words wrap everything in <p></p> 's and it should work ok.

Allan
Back to top
View user's profile Send private message Visit poster's website
plazz2000



Joined: 01 Apr 2002
Posts: 40
Location: Cork, Ireland

PostPosted: Thu Oct 03, 2002 6:48 pm    Post subject: Reply with quote

I couldn't download the M3Gate emulator because the server was busy.

There is a another good one at www.wapuseek.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group