fliptop wrote:
my $filename = $cgi-param('filename');
my $mime_type = $cgi-param('mime_type');
print $cgi-header($mime_type);
open OUT, $filename;
my $buffer;
while (my $read = read(OUT, $buffer, 4096)) {
print $buffer;
}
close OUT;
You're right, when your script deals with parameters,
On Sun, 24 Aug 2003 at 03:04, zsdc opined:
z:fliptop wrote:
z:
z: merrill - i'm a little late on this thread, and the other suggestions are
z: valid, but here's one way to serve up files w/o using a direct link by
z: taking advantage of CGI.pm's header() function:
z:
z: my $cgi = new CGI;
z:
On Tue, 26 Aug 2003 at 00:31, Octavian Rasnita opined:
OR:This is a pretty good method, but it is not so good because the
OR:visitors won't be able to use a Download manager to download the file.
OR:Or better said, they won't be able to resume the download.
true, however the original poster
PROTECTED]
To: Merrill Oakes [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, August 23, 2003 11:29 PM
Subject: Re: Counter triggered on download
On Wed, 20 Aug 2003 at 13:29, Merrill Oakes opined:
MO:I have a link to a PDF file on a web page. I want to count how many
MO:times that someone
fliptop wrote:
merrill - i'm a little late on this thread, and the other suggestions are
valid, but here's one way to serve up files w/o using a direct link by
taking advantage of CGI.pm's header() function:
my $cgi = new CGI;
print $cgi-header('application/pdf');
Actually, it's the same as just:
This is the sort of stuff I was talking about. Modules are great but
sometimes you just have to wrest back control.
zsdc wrote:
fliptop wrote:
merrill - i'm a little late on this thread, and the other suggestions
are
valid, but here's one way to serve up files w/o using a direct link by
On Wed, 20 Aug 2003 at 13:29, Merrill Oakes opined:
MO:I have a link to a PDF file on a web page. I want to count how many
MO:times that someone clicks on the link (i.e. downloads the PDF). The
MO:easy way (at least for me) would be to make them go to a download page
MO:first, and I could
I have a link to a PDF file on a web page. I want to count how many
times that someone clicks on the link (i.e. downloads the PDF). The
easy way (at least for me) would be to make them go to a download page
first, and I could put a counter in the page, BUT this requires an extra
step for the
I would solve this by using the link to invoke a Perl script that would
trip a counter and serve up the PDF document, shift-click be damned. Who
uses shift-click anyway?
Merrill Oakes wrote:
I have a link to a PDF file on a web page. I want to count how many
times that someone clicks on the
Camilo:
THANKS! I agree. I also did a little more due diligence searching and
found some scripts (guess I should have done that before I posted).
Thanks everyone, great group/list.
MO.
Camilo Gonzalez wrote:
I would solve this by using the link to invoke a Perl script that would
trip a
10 matches
Mail list logo