The reference rates are usually updated by 3 p.m. C.E.T. They are based on a regular daily concertation procedure between central banks across Europe and worldwide, which normally takes place at 2.15 p.m. CET.
For further information, please refer to the ECB press release: Additional reference exchange rates for the euro, 3 December 2010.
The reference exchange rates are published both by electronic market information providers and on the ECB's website shortly after the concertation procedure has been completed. Reference rates are published according to the same calendar as the TARGET system.
<?php //This is a PHP(4/5) script example on how eurofxref-daily.xml can be parsed //Read eurofxref-daily.xml file in memory //For this command you will need the config option allow_url_fopen=On (default) $XMLContent = file ( "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" ); //the file is updated daily between 2.15 p.m. and 3.00 p.m. CET foreach( $XMLContent as $line ){ if( preg_match ( "/currency='([[:alpha:]]+)'/" , $line , $currencyCode )){ if( preg_match ( "/rate='([[:graph:]]+)'/" , $line , $rate )){ //Output the value of 1EUR for a currency code echo '1€=' . $rate [ 1 ]. ' ' . $currencyCode [ 1 ]. '<br/>' ; //-------------------------------------------------- //Here you can add your code for inserting //$rate[1] and $currencyCode[1] into your database //-------------------------------------------------- } }} ?>
<?php function StartElement ( $parser , $name , $attrs ) { if (!empty( $attrs [ 'RATE' ])) { echo "1€=" . $attrs [ 'RATE' ]. " " . $attrs [ 'CURRENCY' ]. "<br />" ; } } $xml_parser = xml_parser_create (); xml_set_element_handler ( $xml_parser , "StartElement" , "" ); // for the following command you will need file_get_contents (PHP >= 4.3.0) // and the config option allow_url_fopen=On (default) xml_parse ( $xml_parser , file_get_contents ( "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" )); xml_parser_free ( $xml_parser ); ?>
<?php //This is aPHP(5)script example on how eurofxref-daily.xml can be parsed //Read eurofxref-daily.xml file in memory //For the next command you will need the config option allow_url_fopen=On (default) $XML = simplexml_load_file ( "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" ); //the file is updated daily between 2.15 p.m. and 3.00 p.m. CET foreach( $XML -> Cube -> Cube -> Cube as $rate ){ //Output the value of 1EUR for a currency code echo '1€=' . $rate [ "rate" ]. ' ' . $rate [ "currency" ]. '<br/>' ; //-------------------------------------------------- //Here you can add your code for inserting //$rate["rate"] and $rate["currency"] into your database //-------------------------------------------------- } ?>
1€=1.2923 USD1€=133.26 JPY1€=1.9558 BGN1€=26.069 CZK1€=7.4535 DKK1€=0.85570 GBP1€=289.06 HUF1€=3.4528 LTL1€=0.7002 LVL1€=4.1784 PLN1€=4.3479 RON1€=8.5451 SEK1€=1.2599 CHF1€=7.4650 NOK1€=7.5745 HRK1€=40.3220 RUB1€=2.3791 TRY1€=1.3253 AUD1€=2.6344 BRL1€=1.3315 CAD1€=7.9232 CNY1€=10.0301 HKD1€=12619.13 IDR1€=4.7759 ILS1€=71.8070 INR1€=1440.76 KRW1€=15.9251 MXN1€=3.9047 MYR1€=1.5923 NZD1€=53.254 PHP1€=1.6314 SGD1€=38.511 THB1€=12.2836 ZAR
Quelle: EZB