Whole document tree ![]() ![]() ![]() ![]() ![]() Next: 5.2 Perl-based Conduit Up: 5. Advanced Topics Previous: 5. Advanced Topics   Contents   Index 5.1 POST Requests
Plucker can send POST requests to a host,
just like an HTML form does. It will store the resulting page in the
document. Until a parser can be written to create the requests from
an HTML form they must be built by hand. If you have written or
would be able to write such a parser, contact plucker-dev@rubberchicken.org
POST requests take this form:
"http://harvest.weather.com/cgi-bin/3com/avantgo/palmpilot_city_search.pl" POST="city_destination=46552&action=Go" This URL will get the weather forecast for New Carlisle, In. (zip code 46552). The entry in home.html would be:
<A HREF="http://harvest.weather.com/cgi-bin/3com/avantgo/palmpilot_city_search.pl" POST="city_destination=46552&action=Go">Weather</A><P> Substitute your zip code to get your local forecast.
To obtain a palm friendly map from mapquest.com takes a little doing.
First point your browser to www.mapquest.com
and follow the directions to get a map of
the area of interest. Then click on the Printer-Friendly Map
link in the left column.
NOTE: These instructions are for Netscape, IE should be similar
<A HREF="http://sitemap.mapquest.com/mqmapgend?MQMapGenRequest=FDR2dmwjDE%3bf72g%26FDT7w%7cqut2hr%24.5y8n9u%24%3a%26%40%24%3a%26z%240u6%240u6%24PK%18%19%3dTPWIK,rn061g%26%3dy0du2n%26%40%24%3a%26%40%24%3a1%40" ADD_DATE="965829347" LAST_VISIT="965829337" LAST_MODIFIED="965829337">GIF image 600x600 pixels</A> This is actually a GET request. Even though Plucker understands GET requests, we will change it to POST. Copy the line to another file for editing and open that file. Remove everything from ADD_DATE to the quote(") before >GIF. You can insert plucker options here like MAXWIDTH=300 MAXHEIGHT=300 (to increase the map size on your palm). You may also change the next part (between the > and <). This will be the link that appears on your Plucker Home Page. Mine now looks like this: <A HREF="http://sitemap.mapquest.com/mqmapgend" POST="MQMapGenRequest=FDR2dmwjDE%3bf72g%26FDT7w%7cqut2hr%24.5y8n9u%24%3a%26%40%24%3a%26z%240u6%240u6%24PK%18%19%3dTPWIK,rn061g%26%3dy0du2n%26%40%24%3a%26%40%24%3a1%40" MAXWIDTH=300 MAXHEIGHT=300>New Carlisle Map</A>
Finally, copy the line into your home.html and pluck your map!
NOTE: In the example above the HREF= part is actually the name of a program the server will run for you. The POST= part contains the parameters for the program.
![]() ![]() ![]() ![]() ![]() Next: 5.2 Perl-based Conduit Up: 5. Advanced Topics Previous: 5. Advanced Topics   Contents   Index The Plucker Team |