A Conversation for inject2g2

*gape*

Post 1

Dr E Vibenstein (You know it is, it really is.)

Can we have a WAP version? Please? Pretty please? Pretty please with a smiley - strawberry on top? smiley - grovel

You can have unlimited free ice-cream from my van. Can't say fairer than that. smiley - ok


*gape*

Post 2

Tonto

Yes smiley - grovel WAP please smiley - smiley


*gape*

Post 3

Peregrin

OK smiley - smiley I'll dig out my WAP notes, I haven't written WML for a while.

Do you know of any online virtual WAP browser? I haven't got a WAP phone myself.


*gape*

Post 4

Dr E Vibenstein (You know it is, it really is.)

Er... I used to know a couple.
*goes to check where they are*smiley - run


*gape*

Post 5

Dr E Vibenstein (You know it is, it really is.)

http://www.mobone.com/wapbrowser/ is one, there are others somewhere...
*smiley - runs off again*


*gape*

Post 6

Peregrin

Cheers. I'll see what I can do but I suspect I'll only be able to use phones that allow HTML - cos at the moment inject2g2 requests the normal h2g2 login form, which has a normal address. If a WAP phone requests a normal address, I'm not sure what happens, but I suspect the phone will reject it. smiley - erm

What I really need to do is to have external access to the BBC login and h2g2 databases, but I very much doubt I'd be allowed!

Also I'm not sure how WML can be used with server scripting - I assume it can do, cos of all the train times websites and stuff - I'll have to see if I can view the source of some of them or something. If I can produce WML pages out of an ASP script, I'll be happy, as I could process the h2g2 pages from the server instead of the phone, and then the phone won't have to look at or process HTML at all.


*gape*

Post 7

Dr E Vibenstein (You know it is, it really is.)

Good luck! smiley - ok


*gape*

Post 8

Peregrin

OK so I've figured out how to develop inject2g2 much further, including the use of WAP - but it requires my server to have a component it doesn't have, that or .NET... so I'll have to use a friend's server for some of the processing. This might take a while to set up. But if I have the time to do this, I can guarantee it'll be a cool project smiley - biggrin


*gape*

Post 9

Pastey

Ah, the joys of WAP.

A few thoughts that you've probably already thought of, but hey I can think of them too.

WML is a scaled down version of html (duh!)
Now, here comes the fun stuff...
PHP (yes that again) is capable of outputting a wml page. You merely use the doc type statements to trick the wap browser into thinking that the page is being delivered from a wap server.
PHP is also capable of opening socket type connections to html pages. Basically you can write a PHP script that can send things like login details and what not to a html page, cgi script what have you, and then to read the results back. The PHP can then read the returned page and grab the relevant data from it, use that to then produce a wml string and send it out to a wap browser. As far as the wap browser is concerned it is merely opening a wml page.
It would take some fancy coding I admit, but it is certainly within the realms of do-able.
http://www.google.com/options/wireless.html shows that google already do a similar thing, but I haven't really looked at that yet.

smiley - rose


*gape*

Post 10

Pastey

Using the betsie perl (I think) based parser to interact with you wouldn't even have to faff about taking images out.
In fact, it would even be possible to create a wbmp monotone skin to use with the information.

I really must look at this and discuss it with some of the wap gurus here at work.

smiley - rose


*gape*

Post 11

Pastey

the direct link to open the bestie h2g2 page is

http://www.bbc.co.uk/cgi-bin/education/betsie/parser.pl/www.bbc.co.uk/dna/h2g2/brunel/

using a php script to open that and read in the informaiton to then parse it and out put it as wml should be too hard (he reckons) smiley - winkeye

smiley - rose


*gape*

Post 12

Pastey

In fact... Moderators please note that this is merely display some code for someone, not an attempt to hack the beeb servers, that's much easier. the php code is this $file = fopen ("http://www.bbc.co.uk/cgi-bin/education/betsie/parser.pl/www.bbc.co.uk/dna/h2g2/brunel/", "r"); if (!$file) { echo "

Unable to open remote file.\n"; exit; } $currCount = 0; while (!feof ($file)) { $line = fgets ($file, 1024); echo $line; } } fclose($file); you'd then just need to add in some str_replace features on each of the $line variables, converting all the href="link to href="blahblah/betsie/link


*gape*

Post 13

Pastey

Just a thought to add, seeing as I've not put any flush() commands into this script it would read the entire page in and process it first before pushing it out to the browser. I've not used flush() for wml before so I'm not sure of it's effectiveness.

smiley - rose


*gape*

Post 14

Pastey

Looking into this now, and it's a bit easier than first thought. It seems you just really need the one Betsie link to the front page, Betsie parses the links to refer to Betsie parsed pages itself, so most of the string replacing is done already. It's mostly a case of taking out what you don't want to try and keep the amount of data down. Not sure yet how well it will work, but I've written a fair chunk of the code, just got to check it out.

smiley - rose


*gape*

Post 15

Pastey

Silly me, you don't need to make sure it's linking into Betsie, but have to make sure it's linking into the php/wap parser that's linking into Betsie.

smiley - rose


Key: Complain about this post

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more