home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Komunik / sambar / sambar51p.exe / docs / samples / index.stm < prev    next >
Encoding:
Text File  |  2002-03-31  |  5.8 KB  |  142 lines

  1. <RC$title = Samples>
  2. <RC$navurl = /samples/index.stm>
  3. <RC$navname = Samples>
  4. <RCinclude /header.stm>
  5.  
  6. <TABLE WIDTH=100% BORDER=0 CELLPADDING=15 CELLSPACING=0>
  7. <TR VALIGN=top>
  8. <TD nowrap WIDTH=50%>
  9. <FONT SIZE=+1><B>Network Tools Samples</B></FONT><BR>
  10. <font size=2><I>Code: samples/source/netutils.c</I></font><BR>
  11. <A HREF="../netutils/ipname.htm" TARGET=_top>IP Lookup</A><BR>
  12. <A HREF="../netutils/whois.htm" TARGET=_top>WHOIS Lookup</A><BR>
  13. <A HREF="../netutils/finger.htm" TARGET=_top>Finger Lookup</A><BR>
  14. <P>
  15. <FONT SIZE=+1><B>ISAPI Extensions</B></FONT><BR>
  16. <font size=2><I>Code: samples/isapi/isapitest.c</I></font><BR>
  17. <A HREF=../isapi/index.stm>ISAPI Test Page</A><BR>
  18. <P>
  19. <FONT SIZE=+1><B>CGI Upload</B></FONT><BR>
  20. <font size=2><I>Code: cgi-bin/upload.pl</I></font><BR>
  21. <A HREF=upload.stm>Upload Test Page</A><BR>
  22. <P>
  23. <FONT SIZE=+1><B>Other Samples</B></FONT><BR>
  24. <A HREF=webcam.stm>WebCam Use</A><BR>
  25. <A HREF=../barchart/index.stm>JavaScript Bar Chart</A><BR>
  26. </TD>
  27. <TD nowrap WIDTH=50%>
  28. <FONT SIZE=+1><B>Server-side Includes</B></FONT>
  29. <BR>
  30. <A HREF="ssi1.shtml">#include directive</A><BR>
  31. <A HREF="ssi2.shtml">#echo directive</A><BR>
  32. <A HREF="ssi3.shtml">#exec wincgi directive</A><BR>
  33. <A HREF="ssi4.shtml">#exec cgi directive</A><BR>
  34. <A HREF="ssi5.shtml">#exec cmd directive</A><BR>
  35. <A HREF="ssi6.shtml">#<I>RPC</I> directive</A><BR>
  36. <P>
  37. <FONT SIZE=+1><B>Financial Tools Samples</B></FONT><BR>
  38. <font size=2><I>Code: samples/source/finance.c</I></font><BR>
  39. <A HREF="/finance/mortgage.htm" TARGET=_top>Mortgage Calculator</A><BR>
  40. <A HREF="/finance/amortize.htm" TARGET=_top>Amortization Schedule</A><BR>
  41. <A HREF="/finance/fvmd.htm" TARGET=_top>Monthly Deposits</A><BR>
  42. <A HREF="/finance/fvps.htm" TARGET=_top>Present Sum Calculator</A><BR>
  43. <A HREF="/finance/rate.htm" TARGET=_top>Interest Rate Calculator</A><BR>
  44. </TD>
  45. </TR>
  46.  
  47. <TR>
  48. <TD colspan=2>
  49. <FONT SIZE=+1><B>Page Counter</B></FONT><BR>
  50. <font size=2><I>Code: samples/source/general.c</I></font><BR>
  51. <IMG SRC="/session/pagecount?page=samples">
  52. <BR>
  53. To use the counter, you must create a file in the <I>tmp</I> directory
  54. to hold the page count.  The file should initially contain the character
  55. 0 (you'll find the files <I>tmp/index</I> and <I>tmp/samples</I> corresponding 
  56. with the counters found on the index.htm page and this page. Each time the 
  57. page is referenced, the counter in the file is incremented.  If a file 
  58. corresponding to the counter page you pass to the /session/pagecount 
  59. application does not exist, the count of 0 will be returned.
  60. <P>
  61. <FONT SIZE=+1><B>Windows 95/98 Service Sample</B></FONT><BR>
  62. The <A HREF="/cgi-bin/register.pl">register.pl</A> CGI from Jorge Somers
  63. creates a .reg file for starting the Sambar Server as a Windows 95/98 service;
  64. credit also goes to James Wright for his tips in this area!
  65. <P>
  66. <FONT SIZE=+1><B>Security Code</B></FONT><BR>
  67. The following links illustrate the samples found in the 
  68. <I>samples/source/security.c</I> sample code:
  69. <UL>
  70. <LI><A HREF="../secure/index.shtml">Restrict Users</A> access to a directory by
  71. placing a rule in the <B>[restrict]</B> section of the 
  72. <I>config/security.ini</I> file.  This link is restricted to the user
  73. 'billy-bob', no password.
  74. <P>
  75. <LI><A HREF="/homepage">Refer Users</A> accessing a site that has been moved 
  76. by placing a rule in the <B>[redirect]</B> section of the
  77. <I>config/security.ini</I> file.  This link refers the client to
  78. http://www.sambar.com.
  79. </UL>
  80. <P>
  81. <FONT SIZE=+1><B>CGI/WinCGI</B></FONT>
  82. <BR>
  83. CGI/1.1 samples can be found in the <I>cgi-bin</I> directory.  
  84. <P>
  85. The <A HREF="/cgi-bin/environ.pl">environ.pl</A> sample illustrates the
  86. CGI environment variables defined for use with the Sambar Server.
  87. <P>
  88. The <A HREF="/cgi-bin/dumpenv.pl">dumpenv.pl</A> sample also illustrates the
  89. CGI environment variables defined for use with the Sambar Server.  This script
  90. shows all variables in the environment.  The Sambar Server passes the
  91. environment of the server along with the CGI environment.
  92. <P>
  93. An additional Perl financial application  
  94. <A HREF="/cgi-bin/mortgage.pl">compares mortgates</A> has been provided 
  95. by Kevin Anderson.
  96. <P>
  97. The <A HREF="book.stm">Guest Book</A> sample is a simple 
  98. Perl message book. 
  99. <P>
  100. The following illustrates a simple Perl CGI script for redirecting
  101. requests:
  102. <FORM ACTION="/cgi-bin/nph-redir.pl" METHOD=POST>
  103. <SELECT NAME="dest">
  104. <OPTION VALUE="http://www.yahoo.com">Yahoo!
  105. <OPTION VALUE="http://www.netscape.com">Netscape!
  106. <OPTION VALUE="http://www.cnet.com">c|net
  107. <OPTION VALUE="http://www.microsoft.com">Microsoft
  108. </SELECT>
  109. <INPUT TYPE=submit VALUE="Take Me There!"><BR>
  110. </FORM>
  111. <P>
  112. In addition, CGI and Win-CGI scripts can be "in-lined" into HTML files using
  113. the scripting language.  
  114. The <A HREF="inline.stm">inline.stm</A> page illustrates CGI includes.
  115. The <A HREF="inline2.stm">inline2.stm</A> page illustrates Win-CGI includes.
  116. <P>
  117. <FONT SIZE=+1><B>Remailer</B></FONT>
  118. <P>
  119. The <A HREF="feedback.stm">Feedback Form</A> illustrates how to send
  120. internet mail from a form using the Sambar Server sa_sendmail() API and
  121. requires that the <I>SMTP Server</I> and <I>SMTP Port</I> be properly
  122. configured.  Contact your network administrator for an SMTP Server 
  123. appropriate for your mail.
  124. <P>
  125. The <A HREF="mailit.stm">MailIt Form</A> illustrates how to send
  126. internet mail from a form using the <I>mailit.exe</I> executable
  127. that ships with the Sambar Server (similar to BLAT).  You must know
  128. your SMTP Server to use this form.
  129. <P>
  130. <FONT SIZE=+1><B>Unbuffered I/O</B></FONT>
  131. <P>
  132. The <A HREF="/cgi-bin/nobuffer.pl">Unbuffered I/O</A> perl script illustrates
  133. how the unbuffered I/O capabilities of the Sambar Server CGI engine.
  134. If the <I>config.ini</I> file parameter <B>Unbuffered CGI</B> is set to
  135. <B>true</B> the Sambar Server will return the data from this perl script
  136. as it is generated.
  137. <P>
  138. </TD></TR>
  139. </TABLE>
  140.  
  141. <RCinclude /footer.stm>
  142.