[thelist] Accessing a CGI script from a PHP page

Dave M G martin at autotelic.com
Wed Aug 2 07:08:42 CDT 2006


The List,

I'm writing a PHP script that has a form which accesses a CGI script on 
an external web site.

The CGI I am accessing is a Japanese dictionary. My form will take 
Japanese input, send it to the external server, and hopefully return 
with a list of words and definitions.

What I have for the <form> tag is:

echo "<form method=\"uri\" 
action=\"http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic?9MGI\">";

The "9MGI" part is syntax specific to the CGI script at monash.edu.au 
that I am accessing. It says to use utf8 encoding, and specifies which 
dictionary to use.

The method is "uri", so that the text included in the form will be 
appended to the URL.

When I test my script in my FireFox browser, I get a pop up window 
asking me what to do with a "bin" file. I click to save it, and I get a 
file called "wwwjdic" on my desktop.

I'm a little lost here. Is this a problem of PHP not knowing what to do 
with the returned output? Is it an issue with the script at 
monash.edu.au that I need to contact the developer about? Is it 
something do to with how the form action is structured?

Please advise on how to diagnose and address this problem.

Thank you for your time and help.

--
Dave M G





More information about the thelist mailing list