by Jan Verhoeven, 17 July 2000
Modified: 10 April 2003
Download your free copy of Rebol from the Rebol Homepage
Rebol is a portable scripting language with build-in networking. Rebol scripts are machine independent and run on virtually any major CPU/OS platform: Unix, Linux, Mac, Solaris, Windows.
The Rebol interpreter itself is only a 171kb download
This article is not about Rebol itself but about using Rebol scripts as cgi scripts with Microsoft's Personal Web Server that comes with Windows 98 and can be downloaded for Windows 95.
Follow the steps below to register the Rebol .r script extension for internet services.
Do not forget to restart your computer to make sure that the PWS maps the .r extension to Rebol. It may be sufficient to completely stop PWS and then restart it but I prefer restarting the comouter. You only have to do it once anyway.
Open notepad type the following text and save it as myrebol.r in c:\Inetpub\wwwroot\cgi-bin.
REBOL [
]
print "Content-Type: text/html^/"
either exists? %counter.total [
count: load %counter.total] [
count: 0]
count: count + 1
print [
<HTML><TITLE>"Web Counter -- You are number" count </TITLE>
<BODY>
"Congratulations! Only"
<B> 1000000 - count </B> "more visits until 1 million!!"
</BODY>
</HTML>
]
save %counter.total count
Now make sure that PWS is running, open your browser and navigate
to:
http://localhost/cgi-bin/myrebol.r