Hello everyone,

I have a Counter-Strike 1.6 server and I would like to let my server admins to turn ON the server when it crashes, so I investigated a bit to do this using PHP to run an .exe on my server but I'm not very experienced at php and I couldn't figure out how to do this and it's giving me a very big headache cuz I can't find any website/forum that explains how to run a .exe with php..

I have a dedicated server, with Windows server 2003 sp1 ..

this is the path to the .exe I want to execute with PHP

C:\HLDS\schlds.exe

it's a shortcut, and this is the target:

"C:\HLDS\hlds.exe" -console -game cstrike -ip MYIPHERE -port 27016 +maxplayers 27 +map de_nuke

I would appreciate if someone could tell me the PHP code to run this application through PHP..

Thanks !!

Recommended Answers

All 3 Replies

You have a video game on your server!!!
Then what do you do, use remote desktop to play the game. I don't mean to be offensive but that seems rather odd. If I were you I would uninstall counter strike. But if you wish for your server to load a game without anyone playing it then you would need to use the system() function.

I have a dedicated server where I host my CS 1.6 servers, and I want my admins to be able to turn ON the server when it crashes without giving them access to the server ( remote desktop connection )

Well normally your host would provide you with an admin panel for restarting your server but if however you have not been provided one then unfortunately the only way of turning on the server is by getting the host to use their master admin panel.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.