Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 14th, 2006, 05:33 AM
Registered User
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP Controlling an EXE?

Hey there..

I have a peculiar problem, I have a chat program which when executed on my PC hosts a chatroom. and people can connect to my chat by connecting their clients to my PC (chatip:port), recently ive been thinking ... the exe is just a plain exe which doesnt require any much configuration except its ini file. What if i could host the chat program remotely on a standalone webserver giving me access to its IP and Port.. i made sure that everythings right with my webhost.. now comes the difficuilt part:

I just will upload my file to the server trough FTP.
i wanted to make a UI which could run the exe, kill the process(exe), reply status of exe. but being a learner in PHP i couldnt do that :( is there anyone who can just give me the basic tips (just the basics like how to rn a program and kill the program) i can make my own front end and admin CPanel later..

hoping a positive reply soon.. thanks in advace :)

I am Still Learning ! please Co-operate With Me :)
Old May 16th, 2006, 10:36 AM
Registered User
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ignacio

Hey, I think to run a exe program on the server you can use exec() function. But this will not work on IIS.

Old May 16th, 2006, 06:21 PM
richard.york's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

Assuming you want to pass arguments to the exe, as you would do at the command line you do that with backticks.

For example:

echo `ls`;

You can also call an exe this way.

More infomation about PHP's shell APIs are available at:



Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results


Similar Threads
Thread Thread Starter Forum Replies Last Post
Membership: aspnet_sql.exe -> aspnet_regsql.exe ricpue BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 August 9th, 2006 11:40 PM
problem creating .exe from MFC AppWizard(exe) c++ method Visual C++ 0 July 7th, 2006 03:28 AM
Tomcat5.exe vs tomcat5w.exe Hasib Apache Tomcat 1 June 26th, 2006 06:46 AM
Running cmd line .EXE through PHP geolast PHP How-To 2 January 6th, 2005 02:34 PM
PHP5 and php.exe php-cgi.exe php-win.exe freddo Beginning PHP 1 August 16th, 2004 09:28 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.