Exec Function - Run Exe File

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Xerzi
Forum Newbie
Posts: 1
Joined: Fri Aug 06, 2010 4:29 pm

Exec Function - Run Exe File

Post by Xerzi »

I'm not sure if this is the right function I should be using but ultimately I want to run a windows .exe file on the server, it generates data I need with input from the client that goes to the page, the program is a win32 console program that printf's the data that I need for the website to access. I've seen people executing .bat files using cmd.exe I would be looking for something similar.

Code: Select all

exec("cmd.exe program.exe");
Also I'm not entirely familar with the limitations, I have a website hosted at godaddy, is it only possible to do something like this if I own the server and have access to the server files and such. If I am not on the right path, such as there is a better language to use that does what I need, I would be happy if you could point me in the right direction.
Post Reply