Hi There!
Well.... what they can do is this:
#!/usr/bin/perl -wT;
sub LogAllKindOfInformationOnThisUser;
LogAllKindOfInformationOnThisUser;
print "Location: ftp://filetheuserrequested\n\n";
#END
This will redirect the browser to the ftp file
and you may choose to save it, or the page you're
being redirected to might refresh to the ftp URL
through a META refresh tag...
'They' can do anything...'they' are evil....
Stand up to them
GreetZ!,
ps: sub LogAllKindOfInformationOnThisUser {#Be Creative}; | [reply] [d/l] |
The other way (useful when generating files or extracting
them from somewhere) is to:
print "Content-Type: image/gif\n\n"; #for example
while (<YOUR_FILE>) { print; }
</CODE>
--
Daniellek
| [reply] [d/l] [select] |
This is quite a nice way of doing it. However, if the script that prints this is called "download.pl" then your browser will prompt to save the gif as download.pl.
You can supply a different default filename by adding this to the headers:
print "Content-Disposition: attachment;filename=filename.ext";
where you can change filename.ext to whatever you want. | [reply] [d/l] |
We use it to keep track of how many downloads a file gets ( or at least attempted downloads ) and to what ip they're downloading from. Obviously this is not 100% reliable data, but it gives clients a feel for what is popular and what isn't. The way to the user's information is through the use of enviorment variables i.e. $ENV{'REMOTE_ADDR'} And to create it you do what chOas has said.
HTH | [reply] |
I don't know what server you're using, but this is info that is in the logs. The easy way out would be to parse those logs rather than interrupt the otherwise straightforward HTTP process.
| [reply] |
It depends on how apache is configured. You may have the general log just log IP, time, and file. You don't want it to have Referer, User-Agent, etc except for the files gotten from FTP. I don't care if you use Linux with Mozilla coming from perlmonks to display a .gif, but I do care if all the people downloading a file have certain things in common. If I find out 50% of people downloading a program are using NT, but my program has a small bug with NT, then I'd probably fix it. Also, what if I have a specific version for NT, for Linux, for 95/98? I don't have to trust the user to download the right one, my script does it for me.
| [reply] |