mc & cgi: limiting users to one visit
    Nikorasu Kweto 
    kweto at ma.nma.ne.jp
       
    Sat Jan 19 03:59:01 EST 2002
    
    
  
Andu (thankfully!) wrote:
> That's right, you can keep track of the global $REMOTE_ADDRESS such as
>
> on startup
> put $REMOTE_ADDRESS into userAddress
Sorry but this didn't work.
Here's the relevant portion of my script:
-------------
#!mc
global userAddress
on startup
  if $REQUEST_METHOD is "POST" then
   put $REMOTE_ADDRESS into userAddress
   read from stdin until empty
   put it after buffer
  end if
 put buffer & cr & userAddres into tData
 put tData into url "file:results.txt"
  -- etc etc
end startUp
--------------
I tried re-positioning the $REMOTE_ADDRESS elsewhere in the script, but
always only "buffer" gets writ onto the file (plus a cr).
Any idea where I've gone amiss?
Cheers.
-------------------------------------------------------
 Nicolas Cueto                    |
 - Kinjo Gakuin University     | ".. You may know KungFu,
 - Nagoya Keizai University   |        but I know sendmail! .."
     Takakura Jr/Sr High       |
 - ETJ-Aichi, Sys Admin       |        http://kweto.com
-------------------------------------------------------
---
Outgoing mail is certified virus free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.314 / Virus Database: 175 - Release Date: 2002/01/11
    
    
More information about the metacard
mailing list