Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


Currency Conversion via Yahoo

 

This script will convert 1 US dollar into the equivalent British Pounds. At the moment the conversion is hard coded but later we will show you some tricks to add a bit more variety.

 

 

Here is the script

<?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";
?>


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Check if an image exists(PHP)
fahrenheit to celsius conversion(C Sharp)
Display all drives(VB.net)
View content once(ASP)
while loop example(Java)
display html source with line numbers(php)
move a file(C Sharp)
Reverse a string(VB.net)

    




Copyright © 2003 by programmershelp.co.uk