Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl/shell script that is supposed to download file?

Status
Not open for further replies.

Zac5

Programmer
Jan 30, 2003
75
US
Hi,

I am using the following shell through a perl script to download an image from a location on the server and prompt the client to 'Save as' on their machine. The script is called on the click of a button. So far a file is created on the users machine but it is 0 bytes, can someone help me complete this please, what is missing?
-------------------------------------------------

#! /usr/local/bin/perl

$| =1;

print "Content-type: image/jpg\n";
print "Content-Disposition: attachment; filename=test.jpg\n";
print "Content-Description: image download\n\n";

chdir("/home/user/
------------------------------------------------

Thanks,

Zac
 
Hi,

Have you thought of using wget? It would make your life a lot easier.



William
Software Engineer
ICQ No. 56047340
 
thanks, i'll check it out.

Zac.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top