php - Pulling currency values from other websites -
i pull values of specific currencies websites update them regularly. because need convert euro few foreign currencies. possible or should create own database , update it?
by calling xml http://themoneyconverter.com/rss-feed/eur/rss.xml
$url = "http://themoneyconverter.com/rss-feed/eur/rss.xml"; $cont = file_get_contents($url); $xml = new simplexmlelement($cont); $feeds = "aed/eur"; //// currency rate united arab emirates dirham ///// can use session foreach ($xml->channel->item $xml2){ if ($xml2->title==$feeds){ $xml2->description."<br>"; preg_match('/([0-9]+\.[0-9]+)/', $xml2->description, $matches); $rate = $matches[0]; } }
i hope :)
Comments
Post a Comment