Web script

Need help with C, C++, perl, python, etc?

Web script

Postby randy_h » 2006-11-08 18:35

I know PHP and Javascript but haven't worked with CGI at all. What I would like to do is have a script execute when the user clicks a button on the web page that I am working on. I would like it to be able to tar up a contacts file and email it to a hardcoded recepient. I can script this in bash but I'm not sure how I would execute it from the web page or if this is even possible. I just need someone to point me in the right direction and I can google it from there. Any help would be greatly appreciated, thanks in advance!
randy_h
 
Posts: 2
Joined: 2006-11-08 16:23

Postby ajdlinux » 2006-11-08 20:20

You need to:
* have the apache cgi module loaded
* first line of output must be "Content-type: mime/type" (use your mime type in there), followed by two newlines
* base64 encode or something like that

It may be easier to do it in PHP.
Jabber: xmpp:ajdlinux@jabber.org.au
Spammers, email this: ajdspambucket@exemail.com.au
ajdlinux
 
Posts: 2480
Joined: 2006-04-23 09:37
Location: Port Macquarie, NSW, Australia

Postby randy_h » 2006-11-08 20:31

Yeah... that's what I thought. I'll just use the php 'exec' command to call the script. Thanks.
The voice of God: cat vmlinuz > /dev/snd
randy_h
 
Posts: 2
Joined: 2006-11-08 16:23


Return to Programming

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable