Jump to content

Executing Php Outside Of A Webserver


Renegade605

Recommended Posts

I have recently decided that PHP would be the best way of achieving an effect with a Call of Duty 4 server I am running.I want to have my server run a random map and gametype rotation. What I need is for the server to call on (example) randommap.php and that php file would return the commands necessary to change the map.My question is, how do I get the php to actually run? When I try to call on randommap.php, the code is not parsed before being passed to the server. (Which causes an error, because "<?php" is not a command in CoD4.)

Link to comment
Share on other sites

There is a command-line version of PHP you can use to execute PHP code. If the server can only read from a file, it's not going to work. If you can give it a command to run, you can tell it to execute PHP and give it the filename of the script to run.

Link to comment
Share on other sites

So the command-line would parse the code and output it to another file, which I could then execute with the CoD4 server? How do I access the command-line?I'm running PHP 5.2.6 and I installed it as part of XAMPP 1.6.7

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...