PHP get the current money quote
A simple example to get the money quote using the Finances of yahoo. In the example Euro to Reais.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | < ?php function get_content($url) { $ch = curl_init(); $timeout = 5; curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $file_contents = curl_exec($ch); curl_close($ch); return $file_contents; } setlocale(LC_MONETARY, 'pt_BR'); $euro = explode(',', get_content('http://download.finance.yahoo.com/d/quotes.csv?s=EURBRL=X&f=sl1d1t1ba&e=.csv')); echo '1 euro vale R$ ' . money_format('%i', $euro[1]) . '. Atualizado às '. $euro[3] .' Fonte: Yahoo Finances'; ?> |
With this code I made two twitter accounts to inform to me the money quote those are, cotacaoeuro and cotacaodollar.
7 Comments
→
zOtz68 http://gdjI3b7VaWpU1m0dGpvjRrcu9Fk.com
A staff restaurant teenmodel toplist
=-)
Can you put it on the scales, please? top 100 nn models
kpcclv
Incorrect PIN Preteen Lolita Bbs 606
Good crew it’s cool
Young Little Toplist 39990
How much notice do you have to give? Dorki Rompl Porn
D
A jiffy bag Ebony Child Models
2288