Solved

CGI return of binary file

Posted on 1997-02-28
2
270 Views
Last Modified: 2013-12-25
I need a perl script that will return a binary file and cause the client browser to default to a file name of my choice.  Currently I am using a shell script and can't get the file to default to anything but the name of the script.  I have seen netscape call a script 'pick.cgi' and I get prompted on my browser to save the file as 'program.exe'.  That is exactly what I want.

Thanks.

Don;
0
Comment
Question by:bowendk
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
chump earned 50 total points
ID: 1827633
Use
echo location: ftp://ftp.site.com/program.exe
echo
echo
This will return the binary file called program.exe, the browser will prompt to save this file as program.exe

0
 
LVL 1

Expert Comment

by:chump
ID: 1827634
Sorry, with perl it's:

print "Location: ftp://ftp.site.com/program.exe", "\n\n";
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now