Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
ktl
New Member
New Member



Joined: Mar 02, 2006
Posts: 5

PostPosted: Thu Apr 20, 2006 4:08 pm Reply with quote

I'm working with this program written in php that is used to output games stats into html format. The php code requires a log file, that is generated by the game server to process the information. I downloaded php-4.4.2-installer and have it running on my pc. In order to process the information you begin with the following commands:

//Location where the program files are stored.
c:\mohstats-0.4.7\
//Run this command to process the file.
c:\mohstats-0.4.7> C:\php\php.exe -q mohstats.php "qconsole.log"

It then generates all the files fine and dandy...however all the files are on my hard drive.

My goal is to have the mohstats files and the log required to generate the html files on my webserver and some how run that command from script.php file. I'm not sure how I would embed the following code into a php file: //C:\php\php.exe -q mohstats.php "qconsole.log"// on my webserver.
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Thu Apr 20, 2006 4:22 pm Reply with quote

Not all servers will let you do this, but this is how you can run command lines through PHP
http://us3.php.net/manual/en/function.exec.php

Sorta redundant to be using PHP to run PHP.. may just need to pass the filename as a regular php request. i.e. mohstats.php?filename=qconsole.log
Of course, you have to protect the page so that other's cannot exploit it

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©