Rebol Talk Forum  |  Advertising Forum  |  Offers & Requests  |  Related Requests  |  Topic: A REQUEST (the 1st!)
Pages: [1] Print
Author Topic: A REQUEST (the 1st!)  (Read 1038 times)
leke
Jr. Member
**
Offline Offline

Posts: 92


View Profile WWW
A REQUEST (the 1st!)
« on: June 13, 2005, 04:57:28 AM »

Found this on the excellent senocular.com.

http://www.senocular.com/linkback.php

It 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
Jr. Member
**
Offline Offline

Posts: 92


View Profile WWW
A REQUEST (the 1st!)
« Reply #1 on: August 31, 2005, 06:01:54 AM »

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.

Code:
#!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] Print 
Rebol Talk Forum  |  Advertising Forum  |  Offers & Requests  |  Related Requests  |  Topic: A REQUEST (the 1st!)
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 14, 2008, 01:47:16 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2248 Posts in 586 Topics by 2512 Members
Latest Member: Jhvdyatb

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc