Hi everone.
I'm trying to write a shell script that fetches a number of images from a
map website (www.whereis.com.au). Basically, the page asks you for a street
address and then queries the server in a strange way, and then displays the
map you asked for. It then allows you to scroll in different directions from
that map.
My aim is to be able to write a program that will take a street address,
query the website, and return the initial map, and the 8 maps around it. The
problem is that I can't figure out how the query works. Here is a little
snippet (which I captured with ethereal). This is the initial request, with
the address "200 arden street randwick":
POST
/search/result.jhtml;$sessionid$TREFXTYAABL4RS0Z2WLCDTI?_D ARGS=%2Fsearch%2Fr
esult.jhtml HTTP/1.1
Host: www.whereis.com.au
<various browser headers>
Referer:
http://www.whereis.com.au/search/result.jhtml;$sessionid$TREFXTYAABL4RS0Z2WL
CDTI?_DARGS=%2Fsearch%2Fsearch.jhtml.2
Content-Type: application/x-www-form-urlencoded
Content-Length: 1067
streetNumber=+200&_D%3AstreetNumber=+&streetName=a rden&_D%3AstreetName=+&str
eetType=ST&_D%3AstreetType=+&locality=randwick&_D% 3Alocality=+&postCode=2031
&_D%3ApostCode=+&message=&_D%3Amessage=+&errorPage =result.jhtml&_D%3AerrorPa
ge=+&searchBlob=1%2Chttp%3A%2F%2Fmap3.whereis.com. au%2Ftelmap%2Fmap%2Fmap229
59.gif%2Chttp%3A%2F%2Fmap3.whereis.com.au%2Ftelmap %2Fmap%2Fcmap22959.gif%2C2
57+H12%2C255%2C3%2C4.0000%2C1304%2C920%2C338918.3% 2C6246113.8%2C151.25759%2C
-33.91297%2C0%2CSYDNEY%2C9351%2C2%2C0%2C1%2C1%2C300 0011%3A151.25759%3A-33.91
297&_D%3AsearchBlob=+&blob=1%2Chttp%3A%2F%2Fmap3.w hereis.com.au%2Ftelmap%2Fm
ap%2Fmap22959.gif%2Chttp%3A%2F%2Fmap3.whereis.com. au%2Ftelmap%2Fmap%2Fcmap22
959.gif%2C257+H12%2C255%2C3%2C4.0000%2C1304%2C920% 2C338918.3%2C6246113.8%2C1
51.25759%2C-33.91297%2C0%2CSYDNEY%2C9351%2C2%2C0%2C1%2C1%2C300 0011%3A151.257
59%3A-33.91297&_D%3Ablob=+&command=PAN&_D%3Acommand=+&ac tion=SEARCH&panDirec
tion=E&zoomLevel=2&legend=&proximitySearchType=&_D %3AproximitySearchType=+&_
D%3ArecenterPoint=+&proximitySearchID=0&_D%3Aadver tiserID=+&_D%3AadvertiserI
D=+
Now, I can obviously see my search parameters in there, but how would I use
these in lynx to get the initial webpage? Can I just take these all as POST
variables, or is there something I have to do with the sessionid?
thanks,