Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: http redirection and download

by bigboard (Initiate)
on Sep 24, 2001 at 17:39 UTC ( [id://114314]=note: print w/replies, xml ) Need Help??


in reply to http redirection and download

Thank you both very much for your help, I've used the HTML 'refresh' method, and it works a treat:
my $url="executeable.exe"; print "<meta http-equiv=\"Refresh\" Content=\"0;URL=$url\">\n\n";

Replies are listed 'Best First'.
Rea: http redirection and download
by baku (Scribe) on Sep 24, 2001 at 22:18 UTC

    For a `real' header:

    print <<HTTP; Content-Type: text/html Refresh: 0;URL=http://www.MySite.DOM/myfile.tar.bz2 <html> <head><title> tnx </title></head> <body><h1> thank you </h1></body> </html> HTTP

    To save some CPU cycles, you can make that into an "unparsed" file (on my Apache box, by putting a .http extension on it) with the HTTP headers and the HTML together. The user sees only an HTML page, but there's this magic when they load it from your server that gives them the file.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://114314]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found