				Web-E-Form

"The long & the short of it":

			First of all, the "short":

This program gives greater power to those with e-mail-only access to the 
internet, by expediting submission of World Wide Web forms via e-mail.

Anyone with e-mail access to the 'net can already RETRIEVE web pages in 
text or HTML-form by merely sending a command to a web-mail or agora 
server (usually "send" or "get") followed by the URL.  This is explained 
below, in the section "For more information."

NOW, by using this program as a tool, you can easily SEND BACK 
submissions of web-forms using e-mail alone!

This program also may prove useful to those who have web access but 
occasionally want to fill out a form offline.

If you want to jump right in, start up WEBEFORM.EXE using REGIST.HTM as 
its initial file.  (Drag & Drop is supported with the first file.)  You 
will find the results in OPFILE.TXT.

To use the default option for each entry, simply hit "Enter" repeatedly.

If you're not the 'jump-right-in' type, or you're interested in learning 
more, 

			Here's the "long":

The World Wide Web is composed mostly of linked hypertext "pages".  To 
retrieve a page, a URL (uniform resource locator) is used.  Often in the 
form:

	http://here.it.is/what/it/is.htm

Web forms (HTML level 2.0) are usually filled in using a browser.  When 
all fields are filled, the Submit button is used to signal the browser 
to encode the information in a method called "application/x-www-form-
urlencoded", and then send the information back along the internet.  
This usually takes the form of a URL, followed by "?" and the user's 
responses in encoded form.  Ex.: 

http://here.it.is/cgi/bin?search=help&d=0&choice=long

With an internet-connected browser this is simple--and invisible to the 
user.  And it's not impossible for a user with e-mail-only access.  The 
user needs to "crack" the html code to find the variable names and 
possible choices of parameters to pass back, as well as to encode the 
results for proper web transmission.  

			For more information:

The first document you need is called "Accessing The Internet
By E-Mail - Doctor Bob's Guide to Offline Internet Access"

This document is available from several automated mail servers.
To get the latest edition, send e-mail to ONE of the addresses below.

To: mail-server@rtfm.mit.edu (for US, Canada & South America)
Enter only this line in the BODY of the note:
  send usenet/news.answers/internet-services/access-via-email

To: mailbase@mailbase.ac.uk (for Europe, Asia, etc.)
Enter only this line in the BODY of the note:
  send lis-iis e-access-inet.txt

Dr. Bob's guide will explain, clearly and in-depth, how to send a 
request for a page from the World Wide Web using e-mail as your only 
tool.

One of the best uses of WWW-to-email gateways is the use of internet 
search engines.  These can often take a great deal of time when using a 
direct internet connection.  The nice thing about using e-mail is, 
there's no waiting.  The next time you access your e-mailbox, the search 
results are right there!

Gerald Boyd's series of FAQ's explain very well how to "crack" internet
search engines for access by e-mail.  These FAQ's also serve as 
excellent background information for understanding the operation of this 
program, Web-E-Form.

To retrieve the list of these FAQ's, send an empty message to 
infomart@acy.digex.net:

	Subject:  send index

Send another message to the same address:

	Subject:  send wscrack

Using the information provided in the FAQ's, you can access the search 
engines using e-mail.  However, it is often a time-consuming process to 
do this.  Until now!

			Purpose of this program

Web-E-Form automates the previously tedious work of looking for 
variables and parameters and encoding the result.  It basically does the 
same work your browser does when you type in entries to the fields and 
hit "submit".  The difference is this is NOT a browser.  It does not 
recognize any html codes except those directly related to Forms (level 
2.0).  So you should still make use of your browser to view the page, 
and get a good idea of what information the author of the form is 
looking for.  Then when you're ready to fill out the form, fire up this 
program, point it to the location of the page on your hard disk, type in 
the responses, and bam!  You've got a URL-encoded string ready to send 
to a webmail or agora server.

You will find this string appended to OPFILE.TXT.  You can open that 
text file and copy and paste directly into your e-mail program.

It is recommended that, for the search engines you use often, you enter 
a keyword input something like "xxxx yyyy zzzz".

Then, you can use a text editor to edit OPFILE.TXT, and use the 
Replace function to change xxxx+yyyy+zzzz to the search keywords you 
want.  Make sure to change all spaces to "+".

				Limitations

Unfortunately, *not all* web-forms will work with e-mail.  You may run 
into disappointment if you load up one of your favorite sites and you 
receive a "WARNING:  THIS DOCUMENT CONTAINS METHOD=POST."  

As far as I know, all internet search engines use METHOD=GET.  So do 
many small web-forms.  However, larger forms require METHOD=POST, and 
many smaller forms use it just for ease of coding.

As of this release, I haven't found a way to deal with the METHOD=POST 
subset of the FORM command.  It works fine with "mailto:" ACTION 
strings, naturally, but I still haven't found a way to upload data to a 
web site using e-mail.  I know this is disappointing; I hope to someday
find a way around it.

For obvious reasons, INPUT TYPE=IMAGE will not work.  This program is 
text-only, and to try to handle graphics would go entirely beyond its 
scope.

				Base address

There is a potentially annoying feature of this program--it will often 
ask you for the "base address" of the file you are processing.  This is 
simply the URL of the page--where it is found on the World Wide Web.  It 
is often necessary to use this string to assemble the proper return URL.

If the program does not find a <BASE> command embedded in the HTML, it 
will look for the first URL cited in the file.  Often, agora servers 
will include the URL in the subject line, so in this case this would be 
the correct base address.  Thus, it is a good idea to preserve the 
headers when you retrieve HTML documents.  If you do not wish to 
preserve the header (browsers just never do them justice), you can save 
the URL by inserting the line 

<BASE HREF=[the URL address here]>

somewhere in the beginning of the file.

In any case, you will need to have the address of the page somewhere.  
If the program can not find it, it will ask you for the address.

If you don't have the address, you can try leaving the field blank (hit 
enter).  It _may_ work anyway.

				Other quirks

As mentioned above, this program doesn't have the features of a real web 
browser.  It doesn't recognize the html codes that are not directly 
related to forms (except for a couple that help keep the formatting from 
being totally unreadable).  Thus, you'll have a less-than-desirable view 
of the html file that you're processing.  All text is printed out as-is,
and embedded html codes are represented as a "*".  This is so you can 
recognize where there may be something intended instead of just regular 
text.  For example "Do you want *text-only* results?" Would indicate 
that there is a code just before and just after "text-only".  It may be 
a bold (<B>) or italic (<I>), or something else, but anyway you know 
that the phrase "text-only" is special in some way.

Occasionally, there will be some difficulty deciphering certain menus.  
Because this program ignores HTML formatting, sometimes the item 
description will actually be displayed _before_ the menu number.  The 
key is to remember that all text from the file is displayed in blue.

For example:

*How many purchases have you made on the Internet in the last 6 
months?**0*
 11*
 22*
 33*
 44*
 55+*
 6****
0 for default
option #?

In the above, all text would be in blue except for the menu numbers, 1-
6; and the last two lines.  Remember, all the "*"s represent HTML codes.

If you wanted to choose 5+, you would select <6>, not <5>.  See, the 
descriptions actually precede the selection.  The value for option <1>
is 0, which is shown at the end of the first line.

Just be on the alert for this type of formatting, which I believe is the
exception rather than the rule.  I have found no easy way around this. 
Since writing code to recognize _all_ HTML formatting would be a huge
and prohibitive task, we'll just have to deal with this quirk for now.

				Future features

You may feel somewhat irritated with a few aspects of the program.  For 
one thing, all output is appended to OPFILE.TXT.  In future versions, 
I'd like to make the program insert the finished URL right into your e-
mail client program.  It would have to ask for your preferred web-mail 
or agora server, as well as outputting the correct formatting.  For 
example, many e-mail programs will automatically format the outgoing 
text.  To get around this, you have to manually add an "\" at the end of 
each line.  A future version would do this for you.

I'd also like to make a way to back-tab to a previous prompt, in case 
you messed up.  Of course, since most forms that work with this program 
are short, it's not too hard just to start over.

If you would like to help me make a tailored version for you, let me 
know when you register the program.  There is a field in the 
registration where you can indicate your willingness to volunteer.

				Registration

This program is Freeware.  You are not required to pay any money to use 
this program; however, as 'payment' I ask that you complete and return 
the registration form (REGIST.HTM), using either this program or your 
web browser.

Please try a few of your favorite search engines or web-forms first, 
before you send in the form.  This will help me to make improvements in 
future versions, providing you with an even more effective tool.

Feel free to distribute this program as much as you like, but you may 
not make any modifications to the program.  If you wish to write a 
derivative work, please contact me at edbock@thePentagon.com for 
permission.

				The legal stuff:

The author, Ed Bockelman, is not responsible for any side effects this 
program may cause.  To the best of my knowledge, this program will not 
damage any data or hardware that is connected to your computer.  
However, you the user, by using this program, take full responsibility 
for any effects that may result.

			Credit where credit is due

Thanks to Dustin Majure (majure@thePentagon.com) for additional 
programming and very helpful suggestions.

And thanks to those who beta tested and registered this program.