This is the first script I've ever written in REBOL. I'm pleased with it
because it shows that I'm able to do something productive and that it's
an actual solution to a specific task that needed doing. One improvement
that I would like to make is to read a file of domain names and process
them. Are there any other ways in which it could be improved? TAO
REBOL
[ Title: "WHOIS Maker"
File: %WhoIsMaker.r
Date: 30-May-2000
Purpose: "WhoIs Query, Parse, Save" ]
whois-server: http://www.networksolutions.com/cgi-bin/whois/whois/whois/
the-query: ""
while [not the-query = "."]
[ the-query: ask " WHOIS-> "
whois-the-query: make url! rejoin [whois-server "?" the-query]
query-result-html: read whois-the-query
parse query-result-html [thru <pre> copy query-result-preform to
</pre>]
either find query-result-preform "Your selection is available"
;true - no match
[ print newline "NO MATCH FOUND - enter next query...."
print query-result-preform
]
;false - match found
[ print newline "MATCH FOUND - processed - enter next query...."
print query-result-preform
write/append %whois/masterfile.txt rejoin
[ query-result-preform
newline newline
"X X X"
newline newline ]
html-wrapper: rejoin
[ "<html><head><title>"
the-query
"</title></head><body><pre>"
query-result-preform
"</pre></body></html>" ]
html-file: make file! rejoin ["whois/" the-query ".html"]
write html-file html-wrapper
]
]
David Handy - [EMAIL PROTECTED]
http://www.hlink.net/handy/