Re: WAP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, November 3, 2006 1:19 pm, tg-php@xxxxxxxxxxxxxxxxxxxxxx wrote:
> Doesn't look like the content type is set properly.

The tutorial referenced says:
"Content-type: text/vnd.wap.wml"

wget is telling me I have:
 1 HTTP/1.1 200 OK
 2 Date: Fri, 03 Nov 2006 22:10:56 GMT
 3 Server: Apache/2.0.59 (FreeBSD) PHP/5.1.4 mod_ssl/2.0.59
OpenSSL/0.9.7d
 4 X-Powered-By: PHP/5.1.4
 5 Content-Length: 266
 6 Keep-Alive: timeout=15, max=100
 7 Connection: Keep-Alive
 8 Content-Type: text/vnd.wap.wml

LiveHTTPHeaders in FF is pretty much the same.

Ooooooh!
Is that HTTP/1.1 header messing me up?
What should it be?
Can I even change that?
I mean... It's *still* going out over HTTP, right?...

Is WAP 2.0 supposed to use a different Content-type?  Sure haven't run
across that in my reading so far...

A quick Google seems to indicate the Content-type does not change from
1.x to 2.x
http://www.ericsson.com/mobilityworld/sub/open/technologies/wap/about/wap_on_application_server

The DTD URL is valid, afaict...
Though I confess, I wouldn't really know an invalid DTD from a valid
DTD if they both ran up and bit me...

I was, early on, using text/plain if your ACCEPT headers from the
browser didn't have "vnd.wap" in them *somewhere*, but I ripped that
out, and it's always just text/vnd.wap.xml now, no matter what your
User-Agent...

> Also, if I recall.. Firefox and/or Opera (not IE) will view the pages
> similar (but not identical) to how a cell phone does. Works nice if
> you just want quick/dirty script checking.

For me, at least, FireFox is just prompting to download.

I then try to load that seemingly-valid output file into Nokia's NMB
4.0 and/or their NMI 4.1, and get nada.

Surfing on a Motorola v3c actual handset with their "OpenWave"
built-in browser thingie, I get the whole cardstack as one page.

Surfing on a BlackBerry 7520 with Nextel's default NOL browser, I get
500 Internal Server error - 500 Web service problem. Please contact
the service provider.  AFAIK, I *am* the service provider, and I don't
have a clue what went wrong.

I did have "DocumentIndex" instead of "DirectoryIndex" in my .htaccess
for about 20 minutes from 10:35 to 10:58 (Portland OR time) so
apologies to anybody who tried it in the time-frame.  I always screw
that one up.

My source code is dirt simple, with nothing more than the Zend
Tutorial referenced in it, really...

http://www.zend.com/zend/tut/wap.php?article=wap&kind=t&id=5191&open=1&anc=0&view=1

I suppose my webhost's Apache might be doing something quite different
based on the ACCEPT line?

Doesn't seem to...

-bash-2.05b$ wget
http://acousticdemo.com/nationalsystems/pizzahut.com/wap/index.wml
--server-response                       --14:17:49-- 
http://acousticdemo.com/nationalsystems/pizzahut.com/wap/index.wml
           => `index.wml.3'
Resolving acousticdemo.com... done.
Connecting to acousticdemo.com[67.139.134.211]:80... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.1 200 OK
 2 Date: Fri, 03 Nov 2006 22:17:49 GMT
 3 Server: Apache/2.0.59 (FreeBSD) PHP/5.1.4 mod_ssl/2.0.59
OpenSSL/0.9.7d
 4 X-Powered-By: PHP/5.1.4
 5 Content-Length: 266
 6 Keep-Alive: timeout=15, max=100
 7 Connection: Keep-Alive
 8 Content-Type: text/vnd.wap.wml

100%[=================================================================================>]
266          259.77K/s    ETA 00:00

14:17:49 (259.77 KB/s) - `index.wml.3' saved [266/266]

-bash-2.05b$ cat index.wml.3
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 2.0//EN"
"http://www.wapforum.org/dtd/wml20.dtd"; >
<vml>
<card id="no1" title="Card 1">
<p>Hello World!</p>
</card>

<card id="no2" title="Card 2">
<p>Welcome to our WAP Tutorial!</p>
</card>
</vml>
-bash-2.05b$

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux