CoderZone.org

Category: >> PHP Code >> Basic currency conversion Convert 1 dollar to pounds using Yahoos conversion Bookmark and Share

<< lastnext >>

Snippet Name: Basic currency conversion Convert 1 dollar to pounds using Yahoos conversion

Description: Convert 1 dollar to pounds using Yahoo's conversion.

Comment: (none)

Author: CoderZone
Language: PHP
Highlight Mode: PHP
Last Modified: March 01st, 2009

<?php 
 
$convert = file('http://quote.yahoo.com/m5?a=1&t=GBP&s=USD'); 
$convert = join("",$convert); 
$convert = ereg_replace(".*<table border=1 cellpadding=2 cellspacing=0>",'',$convert); 
$convert = ereg_replace("</table>.*",'',$convert); 
$convert = ereg_replace("</b>.*",'',$convert); 
$convert = ereg_replace(".*<b>",'',$convert); 
echo "1 US Dollar = $convert British Pounds"; 
 
?>
 
 
Add a comment 
jaysonMay 2nd, 2013 12:10pm
thanks for this
© coderzone.org | users online: 12