I'd like to test the getNetText and postNetText commands on a CGI script, but don't know anything about writing cgi scripts.
Hi Phil,
I am not the perl geek per se, but as you didn't get an answer yet, I can share my little knowledge.
Is it possible to throw together a simple cgi script onto my web site that will just echo back parameters I pass in?
it depends on how your server is setup, or better said, what rights you have.
you need the right to execute scripts in any way. normally there is a directory named "cgi-bin", where you can put scripts you want to get executed.
in case of perl scripts you have to know the path to the perl interpreter and write it into line 1 of your script (typically the path is: /usr/bin/perl)
the line breaks of the script must be unix style linebreaks
the chmod (=permissions) of the file must be set to 755 (can be set with your ftp application)
then you can test two simply scripts you find here: <http://www.farbflash.de/forPhil.zip>
make sure, that the line breaks remain unix style (= don't edit with word), put it in the cgi-bin folder on your server, change the chmod to 755 and then call from lingo either:
idd = getNetText("http://www.yourServer.com/cgi-bin/helloworld.pl") if netdone(idd) then put nettextresult(idd)
or:
idd = postNetText("http://www.yourServer.com/cgi-bin/simpleIO.pl", [#name:"phil", #password:"asdf", #comment:"hello"])
if netdone(idd) then put nettextresult(idd)
or:
idd = getNetText("http://www.yourServer.com/cgi-bin/simpleIO.pl?name=phil&password=asdf&comment=hello")
if netdone(idd) then put nettextresult(idd)
if you have OSX to test on, you can test the scripts very easy locally:
turn on personal websharing in the sharing prefpane, put the scripts into /Library/WebServer/CGI-Executables,
change the chmod (terminal: chmod 755 /Library/WebServer/CGI-Executables/simpleIO.pl) and get/postnettext to the server 127.0.0.1 (http://127.0.0.1/cgi-bin/helloworld.pl)
--
||| ażex -- [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]