Question : PHP Design Help

Right now I have a script written in vbscript/autoit that is run on each of our supported machines. When I setup the machine I run the script and fill out the customers information. It also pulls information about the machine such as serial number, model, IP, etc. I then write this data to a csv file and moved to our network share. This has been fine, but the data is really not usable in this form so I was hoping to get the data into a database.
My question is how can I use PHP to get that same info into a MYSQL database? PHP cannot grab things like model, serial number, registry info and other things like that correct? Can I pop a browser, have it read a text file and populate text fields with the info. I would then submit the data through the browser and it would add the entry to the database. Any input on this would truly be appreciated. Thanks.

Answer : PHP Design Help

correct - you can get nncron from http://www.nncron.ru/ which will run on windows as a service.

install this on the server that is running your webserver and set up a job to execute every period
#* * * * *
#| | | | |
#| | | | +----- Day of the Week   (range: 1-7, where 1 is Monday)
#| | | +------- Month of the Year (range: 1-12)
#| | +--------- Day of the Month  (range: 1-31)
#| +----------- Hour              (range: 0-23)
#+------------- Minute            (range: 0-59)

# PROCESS CUSTOM PHP SCRIPT
# Every 20 minutes
*/20 * * * * c:\php\php.exe -f d:\path\to\webroot\script.php

Then your php script will do all of the work.
- check for files in the directory
- connect to db
- process each file
- write data to database
- delete each file after processing
- send email notification with summary

Random Solutions  
 
programming4us programming4us