Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CGI return of binary file

Posted on 1997-02-28
2
Medium Priority
?
281 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 150 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

886 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