Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ch = curl_init();
- $cv = curl_version();
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
- curl_setopt($ch, CURLOPT_URL, "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml");
- $xml_data = curl_exec($ch);
- curl_close($ch);
- $parser = simplexml_load_string($xml_data);
- echo $parser->Cube->Cube->Cube[5]['rate'];
- echo " GBP<br>";
- echo $parser->Cube->Cube->Cube[7]['rate'];
- echo " PLN<br>";
- echo $parser->Cube->Cube->Cube[9]['rate'];
- echo " SEK<br>";
- echo $parser->Cube->Cube->Cube[10]['rate'];
- echo " NOK<br>";
- echo $parser->Cube->Cube->Cube[4]['rate'];
- echo " DKK<br>";
- echo $parser->Cube->Cube->Cube[0]['rate'];
- echo " USD<br>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement