When a WAP application makes a request, it is translated into HTTP, which carries some extra WAP-related headers. These are translated into corresponding HTTP_* environment variables in the CGI request. I list some of the interesting ones.
Well, there isn't anything terribly exciting in there. It would be nice if there were some kind of portable subscriber-ID, but there's only UP.Browser's UP-Subno.
Here are some specimen requests.
The first is from Wapsilon:
DOCUMENT_ROOT = /srv/www/urchin.earth.li/html GATEWAY_INTERFACE = CGI/1.1 HTTP_ACCEPT = text/vnd.wap.wml HTTP_ACCEPT_LANGUAGE = en,fr;q=0.5 HTTP_CONNECTION = TE, close HTTP_HOST = urchin.earth.li HTTP_RANGE = bytes=0-102399 HTTP_REFERER = http://q=1&f=1&t=w&u=http%3A%2F%2Furchin.earth.li%2Fcgi-bin%2Ftwic%2Fwml%2Fdump.py HTTP_TE = deflate,gzip;q=0.3 HTTP_USER_AGENT = Wapsilon/2.3 (www.wapsilon.com) HTTP_X_FORWARDED_FOR = 81.134.173.95 PATH = /bin:/usr/bin:/sbin:/usr/sbin QUERY_STRING = REMOTE_ADDR = 217.71.121.96 REMOTE_HOST = wapsilon.com REMOTE_PORT = 53068 REQUEST_METHOD = GET REQUEST_URI = /cgi-bin/twic/wml/dump.py SCRIPT_FILENAME = /srv/www/urchin.earth.li/cgi-bin/twic/wml/dump.py SCRIPT_NAME = /cgi-bin/twic/wml/dump.py SERVER_ADDR = 193.201.200.73 SERVER_ADMIN = webmaster@urchin.earth.li SERVER_NAME = urchin.earth.li SERVER_PORT = 80 SERVER_PROTOCOL = HTTP/1.1 SERVER_SIGNATURE = <ADDRESS>Apache/1.3.26 Server at urchin.earth.li Port 80</ADDRESS> SERVER_SOFTWARE = Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 mod_perl/1.26 UNIQUE_ID = P2Nc1sHJyEkAAC@FMXE
The other is from my from my phone, via the T-Mobile gateway:
DOCUMENT_ROOT = /srv/www/urchin.earth.li/html GATEWAY_INTERFACE = CGI/1.1 HTTP_ACCEPT = application/vnd.wap.wmlc, application/vnd.wap.wbxml, application/vnd.wap.wmlscriptc, application/xhtml+xml, application/vnd.wap.xhtml+xml, application/vnd.wap.mms-message, text/css, */*, text/x-wap.wml,text/vnd.wap.wml,text/x-hdml,text/vnd.wap.wmlscript, */* HTTP_ACCEPT_APPLICATION = 1, 2 HTTP_ACCEPT_CHARSET = us-ascii, iso-8859-1, utf-8, iso-10646-ucs-2, UTF-8, * HTTP_ACCEPT_LANGUAGE = en HTTP_BEARER_INDICATION = 0 HTTP_CACHE_CONTROL = No-Cache HTTP_CONNECTION = close HTTP_ENCODING_VERSION = 1.3 HTTP_HOST = urchin.earth.li:80 HTTP_PROFILE = http://wap.sonyericsson.com/UAprof/T68R502.xml HTTP_USER_AGENT = SonyEricssonT68/R502 UP.Link/5.1.1.3 HTTP_X_FORWARDED_FOR = 10.59.94.236 HTTP_X_UP_DEVCAP_CHARSET = us-ascii, iso-8859-1, utf-8, iso-10646-ucs-2 HTTP_X_UP_DEVCAP_MAX_PDU = 3000 HTTP_X_UP_FAX_ACCEPTS = none HTTP_X_UP_FAX_LIMIT = 0 HTTP_X_UP_SUBNO = MMNCHKPGPDMPMGIA_uplink.one2one.net HTTP_X_UP_UPLINK = uplink.one2one.net HTTP_X_UP_WAPPUSH_SECURE = uplink.one2one.net:9003/pap HTTP_X_UP_WAPPUSH_UNSECURE = uplink.one2one.net:9002/pap PATH = /bin:/usr/bin:/sbin:/usr/sbin QUERY_STRING = REMOTE_ADDR = 149.254.1.21 REMOTE_HOST = radius.one2one.net REMOTE_PORT = 52026 REQUEST_METHOD = GET REQUEST_URI = /cgi-bin/twic/wml/dump.py SCRIPT_FILENAME = /srv/www/urchin.earth.li/cgi-bin/twic/wml/dump.py SCRIPT_NAME = /cgi-bin/twic/wml/dump.py SERVER_ADDR = 193.201.200.73 SERVER_ADMIN = webmaster@urchin.earth.li SERVER_NAME = urchin.earth.li SERVER_PORT = 80 SERVER_PROTOCOL = HTTP/1.1 SERVER_SIGNATURE = <ADDRESS>Apache/1.3.26 Server at urchin.earth.li Port 80</ADDRESS> SERVER_SOFTWARE = Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 mod_perl/1.26 UNIQUE_ID = P2Nc@sHJyEkAACtOPuM