What is the simplest way to make scheduled XML parsing into an SQL database?

inciongjbe

New Member
So, ok, I'm using PHP for my website, and suppose I know quite a bit of MySQL and a little bit of MS SQL.Now, I want to parse some XML with PHP/USD exchange rate and store it in the database.The simplest way one could think of would be, perhaps this:\[code\]$XMLContent=file("http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=USD&ToCurrency=PHP");foreach($XMLContent as $line){$a=&strip_tags($line);if (is_numeric($a)){ // output the exchange rate echo $a; // THen I would probably go like this: mssql_query('update table set xchange_rate='.(float)floatval($a)); // break cycle once found; break;}}\[/code\]That would perfectly do... if it didn't take 0.8 seconds to run this script, due to external XML GET request.So I suppose I should use Windows Scheduler, and make a task to run, let's say every hour to update the records. Now the question is, I've no idea what script I would use. I mean, I can't just simply run browser with a PHP script - that would be rediculous.So, what would be the easiest way to make a script/ application to run it outside PHP, without a need to actually open a browser.Thanks!EDITGood point, right now I'm testing it on Win7, but later it is going to be implemented on Windows Server (2008?).
 
Back
Top