|
Pages: [1]
|
 |
|
Author
|
Topic: A REQUEST (the 1st!) (Read 1038 times)
|
|
leke
|
Found this on the excellent senocular.com. http://www.senocular.com/linkback.phpIt displays where people are coming from (and where they are going). The last 50 referers Would someone like to have a go at it in REBOL?
|
|
|
|
« Last Edit: June 13, 2005, 04:59:02 AM by leke »
|
Logged
|
|
|
|
|
leke
|
Hmmm I'm a bit embarrassed now. I found out that the key to this page was pretty easy. It is just the remote-addr data found in the system/options/cgi Object. Here is an example of how to get the address the user came from. #!C:/REBOL/REBOL.EXE --cgi --script REBOL[] print "Content-Type: text/HTML^/^/"
print {<html> <title>REMOTE ADDRESS TEST</title> <body>}
user: system/options/cgi/remote-addr nl: {<br>}
print [nl "User came from:" nl nl] print [user nl]; prints a tuple print read rejoin [dns:// user]; converts the tuple to a string print ["(" now ")"]
print [</body></html>]
|
|
|
|
« Last Edit: August 31, 2005, 06:06:05 AM by leke »
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |