Gossamer Forum
Home : General : Perl Programming :

cgi script to execute a C program ?

Quote Reply
cgi script to execute a C program ?
I am interfacing my computer to a simple circuit through the printer port. To do this I coded a C program to interface with the circuit. What I want is to control remotely (through the internet). So I need to run a cgi script through the webserver to execute the C program that I interfaced with my circuit. Can you guys give me a sample script that will execute a C program.Smile
Quote Reply
Re: [navarra_rd] cgi script to execute a C program ? In reply to
Are you able to run a C script via Telnet or SSH? If so, use the `` option...

For example;


#!/usr/bin/perl

`command to run that would normally be done in telnet`;

print "Content-type: text/html \n\n";
print "done";

Just guessing..as I've never had to run a C program over the Net before Tongue

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] cgi script to execute a C program ? In reply to
>>Just guessing..as I've never had to run a C program over the Net before<<

Um what do you think:

#!/usr/bin/perl does Tongue
Quote Reply
Re: [navarra_rd] cgi script to execute a C program ? In reply to
Look into cgic which is available from:

http://www.boutell.com/cgic/

- wil