Overview

When a person fills out a form on a web page and presses the submit button, a program is run by the web server and given the information that was typed into the form. One kind of program that can be run by the web server is called a CGI. The webgate.exe CGI program is included with the GetWeb interface for this purpose. Webgate must be put on the web server in a directory where the server looks for CGI programs. This is usually the cgi-bin or scripts directory. When you specify the CGI Data Path in PageGate's Admin program, the webgate.exe program is copied to that location. The webgate.exe CGI can be named as the form action in any web page to enable the form's data to be sent to it. Here is a simple web page example that uses webgate.exe:

<HTML>
<HEAD>
<TITLE>
Sample Pager Web Page
</TITLE>
</HEAD>
<BODY>
<H2><CENTER>Enter a message to be sent to a pager</CENTER></H2>
<HR>
<FORM ACTION ="http://www.mydomain.com/cgi-bin/webgate.exe" METHOD=POST>
<CENTER>FROM</CENTER>
<CENTER>
<INPUT SIZE=40 MAXLENGTH=100 NAME="FRM"></TEXTAREA>
</CENTER>
<BR>
<CENTER>MESSAGE</CENTER>
<CENTER>
<TEXTAREA COLS=60 ROWS=5 WRAP=VIRTUAL NAME="MSG"></TEXTAREA>
</CENTER>
<BR>
<CENTER>
<INPUT TYPE=SUBMIT NAME = "SEND" VALUE = "SEND PAGE">
<INPUT TYPE=RESET VALUE = "CLEAR FORM">
</CENTER>
<INPUT TYPE=HIDDEN NAME="USER" VALUE="pageruser">
</FORM>
</BODY>
</HTML>

In this example, please notice the path used for the webgate.exe CGI program. In web pages the path should be set to the full URL of the CGI program. You should substitute your domain name for 'mydomain.com'. The recipient name of the pager in this example is 'pageruser'. Every web page that is to use webgate must have the following variables included in them. They can be either entered by the user of the webpage, or hard coded into the form:

FORM ACTION - naming webgate.exe as the form's action
FRM - a text field that will contain the name of who the message is being sent from
MSG - a text field that will contain the actual message text
USER - a text field that will contain the name of the recipient (pager) the message is to be sent to

Here are some optional fields that can be used:

NOPAGE - if this field is set to 'NOPAGE', the message won't actually be sent to the recipient's pager. It will however be forwarded to the recipient's email forwarding address (if GetMail is setup). This would turn the web page into a sort of web to email gateway.
SUBJECT - to use the Multi-Page option, a SUBJECT field is used for the recipient names.

This is an example where the pager's recipient is not hard-coded into the web page, and can be typed manually each time (also the NOPAGE option is given):

<HTML>
<HEAD>
<TITLE>
PageGate's Page-A-User Web Page
</TITLE>
</HEAD>
<BODY>
<H2><CENTER>Fill in This Form to Send a Page</CENTER></H2>
<FORM ACTION ="http://www.mydomain.com/cgi-bin/webgate.exe" METHOD=POST>
<CENTER>
USER <INPUT SIZE=40 MAXLENGTH=40 NAME="USER"></TEXTAREA>
</CENTER>
<BR>
<CENTER>
FROM <INPUT SIZE=40 MAXLENGTH=80 NAME="FRM"></TEXTAREA>
</CENTER>
<BR>
<CENTER>MESSAGE</CENTER>
<CENTER>
<TEXTAREA COLS=60 ROWS=5 WRAP=VIRTUAL NAME="MSG"></TEXTAREA>
</CENTER>
<BR>
<CENTER>
<INPUT TYPE=SUBMIT NAME = "SEND" VALUE = "SEND PAGE"><INPUT TYPE=RESET VALUE = "CLEAR FORM">
</CENTER>
</FORM>
</BODY>
</HTML>