mc & cgi: limiting users to one visit
andu
undo at cloud9.net
Sat Jan 19 11:25:00 EST 2002
Nikorasu Kweto wrote:
>
> 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
This should be $REMOTE_ADDR not $REMOTE_ADDRESS, my mistake and Apache's
inconsistency.
> 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
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
--
__________________________
Regards, Andu
More information about the metacard
mailing list