home *** CD-ROM | disk | FTP | other *** search
- <RC$title = Samples>
- <RC$navurl = /samples/index.stm>
- <RC$navname = Samples>
- <RCinclude /header.stm>
-
- <TABLE WIDTH=100% BORDER=0 CELLPADDING=15 CELLSPACING=0>
- <TR VALIGN=top>
- <TD nowrap WIDTH=50%>
- <FONT SIZE=+1><B>Network Tools Samples</B></FONT><BR>
- <font size=2><I>Code: samples/source/netutils.c</I></font><BR>
- <A HREF="../netutils/ipname.htm" TARGET=_top>IP Lookup</A><BR>
- <A HREF="../netutils/whois.htm" TARGET=_top>WHOIS Lookup</A><BR>
- <A HREF="../netutils/finger.htm" TARGET=_top>Finger Lookup</A><BR>
- <P>
- <FONT SIZE=+1><B>ISAPI Extensions</B></FONT><BR>
- <font size=2><I>Code: samples/isapi/isapitest.c</I></font><BR>
- <A HREF=../isapi/index.stm>ISAPI Test Page</A><BR>
- <P>
- <FONT SIZE=+1><B>CGI Upload</B></FONT><BR>
- <font size=2><I>Code: cgi-bin/upload.pl</I></font><BR>
- <A HREF=upload.stm>Upload Test Page</A><BR>
- <P>
- <FONT SIZE=+1><B>Other Samples</B></FONT><BR>
- <A HREF=webcam.stm>WebCam Use</A><BR>
- <A HREF=../barchart/index.stm>JavaScript Bar Chart</A><BR>
- </TD>
- <TD nowrap WIDTH=50%>
- <FONT SIZE=+1><B>Server-side Includes</B></FONT>
- <BR>
- <A HREF="ssi1.shtml">#include directive</A><BR>
- <A HREF="ssi2.shtml">#echo directive</A><BR>
- <A HREF="ssi3.shtml">#exec wincgi directive</A><BR>
- <A HREF="ssi4.shtml">#exec cgi directive</A><BR>
- <A HREF="ssi5.shtml">#exec cmd directive</A><BR>
- <A HREF="ssi6.shtml">#<I>RPC</I> directive</A><BR>
- <P>
- <FONT SIZE=+1><B>Financial Tools Samples</B></FONT><BR>
- <font size=2><I>Code: samples/source/finance.c</I></font><BR>
- <A HREF="/finance/mortgage.htm" TARGET=_top>Mortgage Calculator</A><BR>
- <A HREF="/finance/amortize.htm" TARGET=_top>Amortization Schedule</A><BR>
- <A HREF="/finance/fvmd.htm" TARGET=_top>Monthly Deposits</A><BR>
- <A HREF="/finance/fvps.htm" TARGET=_top>Present Sum Calculator</A><BR>
- <A HREF="/finance/rate.htm" TARGET=_top>Interest Rate Calculator</A><BR>
- </TD>
- </TR>
-
- <TR>
- <TD colspan=2>
- <FONT SIZE=+1><B>Page Counter</B></FONT><BR>
- <font size=2><I>Code: samples/source/general.c</I></font><BR>
- <IMG SRC="/session/pagecount?page=samples">
- <BR>
- To use the counter, you must create a file in the <I>tmp</I> directory
- to hold the page count. The file should initially contain the character
- 0 (you'll find the files <I>tmp/index</I> and <I>tmp/samples</I> corresponding
- with the counters found on the index.htm page and this page. Each time the
- page is referenced, the counter in the file is incremented. If a file
- corresponding to the counter page you pass to the /session/pagecount
- application does not exist, the count of 0 will be returned.
- <P>
- <FONT SIZE=+1><B>Windows 95/98 Service Sample</B></FONT><BR>
- The <A HREF="/cgi-bin/register.pl">register.pl</A> CGI from Jorge Somers
- creates a .reg file for starting the Sambar Server as a Windows 95/98 service;
- credit also goes to James Wright for his tips in this area!
- <P>
- <FONT SIZE=+1><B>Security Code</B></FONT><BR>
- The following links illustrate the samples found in the
- <I>samples/source/security.c</I> sample code:
- <UL>
- <LI><A HREF="../secure/index.shtml">Restrict Users</A> access to a directory by
- placing a rule in the <B>[restrict]</B> section of the
- <I>config/security.ini</I> file. This link is restricted to the user
- 'billy-bob', no password.
- <P>
- <LI><A HREF="/homepage">Refer Users</A> accessing a site that has been moved
- by placing a rule in the <B>[redirect]</B> section of the
- <I>config/security.ini</I> file. This link refers the client to
- http://www.sambar.com.
- </UL>
- <P>
- <FONT SIZE=+1><B>CGI/WinCGI</B></FONT>
- <BR>
- CGI/1.1 samples can be found in the <I>cgi-bin</I> directory.
- <P>
- The <A HREF="/cgi-bin/environ.pl">environ.pl</A> sample illustrates the
- CGI environment variables defined for use with the Sambar Server.
- <P>
- The <A HREF="/cgi-bin/dumpenv.pl">dumpenv.pl</A> sample also illustrates the
- CGI environment variables defined for use with the Sambar Server. This script
- shows all variables in the environment. The Sambar Server passes the
- environment of the server along with the CGI environment.
- <P>
- An additional Perl financial application
- <A HREF="/cgi-bin/mortgage.pl">compares mortgates</A> has been provided
- by Kevin Anderson.
- <P>
- The <A HREF="book.stm">Guest Book</A> sample is a simple
- Perl message book.
- <P>
- The following illustrates a simple Perl CGI script for redirecting
- requests:
- <FORM ACTION="/cgi-bin/nph-redir.pl" METHOD=POST>
- <SELECT NAME="dest">
- <OPTION VALUE="http://www.yahoo.com">Yahoo!
- <OPTION VALUE="http://www.netscape.com">Netscape!
- <OPTION VALUE="http://www.cnet.com">c|net
- <OPTION VALUE="http://www.microsoft.com">Microsoft
- </SELECT>
- <INPUT TYPE=submit VALUE="Take Me There!"><BR>
- </FORM>
- <P>
- In addition, CGI and Win-CGI scripts can be "in-lined" into HTML files using
- the scripting language.
- The <A HREF="inline.stm">inline.stm</A> page illustrates CGI includes.
- The <A HREF="inline2.stm">inline2.stm</A> page illustrates Win-CGI includes.
- <P>
- <FONT SIZE=+1><B>Remailer</B></FONT>
- <P>
- The <A HREF="feedback.stm">Feedback Form</A> illustrates how to send
- internet mail from a form using the Sambar Server sa_sendmail() API and
- requires that the <I>SMTP Server</I> and <I>SMTP Port</I> be properly
- configured. Contact your network administrator for an SMTP Server
- appropriate for your mail.
- <P>
- The <A HREF="mailit.stm">MailIt Form</A> illustrates how to send
- internet mail from a form using the <I>mailit.exe</I> executable
- that ships with the Sambar Server (similar to BLAT). You must know
- your SMTP Server to use this form.
- <P>
- <FONT SIZE=+1><B>Unbuffered I/O</B></FONT>
- <P>
- The <A HREF="/cgi-bin/nobuffer.pl">Unbuffered I/O</A> perl script illustrates
- how the unbuffered I/O capabilities of the Sambar Server CGI engine.
- If the <I>config.ini</I> file parameter <B>Unbuffered CGI</B> is set to
- <B>true</B> the Sambar Server will return the data from this perl script
- as it is generated.
- <P>
- </TD></TR>
- </TABLE>
-
- <RCinclude /footer.stm>
-