download limits - Rev CGI?

Klaus Major klaus at major-k.de
Mon Sep 8 09:08:57 EDT 2008


Hi sims,

> Hi sims,
>
>> I want to set a limit to the number of times a text file(s) can be  
>> downloaded.
>>
>> Example, say I have a group of 100 people eligible to download a file
>> (put url "http://www.somebody.com/hamburger.txt" ) with a Rev app.
>> I only want the first fifty to be able to get the file, anyone that
>> tries after that would be told "Sorry, snooze and you lose".
>>
>> I might want to be able to set up many such limited situations
>> at the same time (different files available for different groups).
>>
>> I've not done any Rev CGI 'stuff', is this the sort of thing that
>> could be done with Rev CGI?
>
> Yes, of course!
>
> Just check/write a simple textfile(s) with a counter when your CGI  
> starts.

looks I was a bit too fast!

The query
put url "http://www.somebody.com/hamburger.txt" into whatever
will be handled by the webserver running at "www.somebody.com" but not  
by your CGI!

In that case you will have to script your CGI script to return that  
namely file and you will have to:
put url "http://www.somebody.com/cgi_that_delivers_the_file_hamburger"  
into whatever
and check "$QUERY_STRING" in your CGI(s)

Anyway, it is possible :-)

>> sims
>
> Regard

Best

Klaus Major
klaus at major-k.de
http://www.major-k.de





More information about the use-livecode mailing list