Execute external program via PHP

This is a discussion on "Execute external program via PHP" within the PHP Forum section. This forum, and the thread "Execute external program via PHP are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 1st, 2005, 17:41
Up'n'Coming Member
Join Date: Sep 2005
Location: athens
Age: 25
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Execute external program via PHP

Hi all,
I need to execute a command-line program through PHP.
I have a form which includes a textarea, where the user writes his data.
These data will be used as input for the commend-line program.
Will I go something like:

$data = $_GET['info'];
Which function shall I use? System, exec, shell_exec, passthru?
I can't choose which one is the correct.
By the way, the command which I use when I write the script in the command line is :

program_name [argument1 -> A database file] [argument2 -> info supplied by user]

So, in the function that will be used, the data supplied by the user will be passed as my second argument (the 1st argument is a file in my hard disk).

And, lastly, do I need to change any global settings for PHP in order to perform such actions, ie running scripts via PHP programs???

Thanx a lot!
Reply With Quote

  #2 (permalink)  
Old Oct 1st, 2005, 23:08
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
http://ca.php.net/manual/en/function.exec.php
Reply With Quote
Reply

Tags
execute, external, program, via, php

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Asp to execute a command in a .exe file Andrew1986 Classic ASP 7 Jan 11th, 2008 09:44
open an external program Rothers2005 Flash & Multimedia Forum 1 Apr 18th, 2007 16:39
SSI, server.execute and Global variables D3mon Classic ASP 5 May 8th, 2004 09:50
server.execute error..help me tulip4heaven Classic ASP 2 Apr 26th, 2004 17:59


All times are GMT. The time now is 18:34.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43