View previous topic :: View next topic |
Author |
Message |
plazz2000
Joined: 01 Apr 2002 Posts: 40 Location: Cork, Ireland
|
Posted: Sun Sep 29, 2002 2:22 pm Post subject: b2wap.php hack |
|
|
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 |
|
 |
GamerZ
Joined: 15 May 2002 Posts: 537 Location: Singapore
|
Posted: Sun Sep 29, 2002 2:57 pm Post subject: |
|
|
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 |
|
 |
plazz2000
Joined: 01 Apr 2002 Posts: 40 Location: Cork, Ireland
|
Posted: Sun Sep 29, 2002 3:42 pm Post subject: |
|
|
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 |
|
 |
GamerZ
Joined: 15 May 2002 Posts: 537 Location: Singapore
|
Posted: Sun Sep 29, 2002 3:58 pm Post subject: |
|
|
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 |
|
 |
plazz2000
Joined: 01 Apr 2002 Posts: 40 Location: Cork, Ireland
|
Posted: Sun Sep 29, 2002 5:05 pm Post subject: |
|
|
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 |
|
 |
plazz2000
Joined: 01 Apr 2002 Posts: 40 Location: Cork, Ireland
|
Posted: Sun Sep 29, 2002 5:32 pm Post subject: 1.0.1 |
|
|
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 |
|
 |
GamerZ
Joined: 15 May 2002 Posts: 537 Location: Singapore
|
Posted: Mon Sep 30, 2002 5:17 am Post subject: |
|
|
i try to reanme it to wml when i get home after school _________________
++ GamerZ.Per.Sg - Complex Simplicity |
|
Back to top |
|
 |
plazz2000
Joined: 01 Apr 2002 Posts: 40 Location: Cork, Ireland
|
Posted: Mon Sep 30, 2002 8:03 am Post subject: |
|
|
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 |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Tue Oct 01, 2002 12:41 am Post subject: |
|
|
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 |
|
 |
imeridian
Joined: 12 Feb 2002 Posts: 191
|
Posted: Tue Oct 01, 2002 11:36 am Post subject: |
|
|
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 |
|
 |
GamerZ
Joined: 15 May 2002 Posts: 537 Location: Singapore
|
Posted: Tue Oct 01, 2002 1:02 pm Post subject: |
|
|
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 |
|
 |
GamerZ
Joined: 15 May 2002 Posts: 537 Location: Singapore
|
Posted: Tue Oct 01, 2002 1:02 pm Post subject: Re: 1.0.1 |
|
|
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 |
|
 |
plazz2000
Joined: 01 Apr 2002 Posts: 40 Location: Cork, Ireland
|
Posted: Tue Oct 01, 2002 2:33 pm Post subject: 1.0.3 |
|
|
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 |
|
 |
amcd
Joined: 05 Apr 2002 Posts: 16 Location: Scotland
|
Posted: Wed Oct 02, 2002 12:33 pm Post subject: |
|
|
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 |
|
 |
plazz2000
Joined: 01 Apr 2002 Posts: 40 Location: Cork, Ireland
|
Posted: Thu Oct 03, 2002 6:48 pm Post subject: |
|
|
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 |
|
 |
|