13 Oct 2008
Lenon.com
Home Account Forums Downloads Web Links

Yahoo Exchange Rate Block
 
       Lenon.com Forum Index » Blocks     View previous topic :: View next topic  
Author Message
oudie
Newbie
Newbie


Joined: Dec 18, 2003
Posts: 3

Posted: Mon Oct 25, 2004 11:26 pm    Post subject: Yahoo Exchange Rate Block Reply with quote

ASCurrency module block is great, but doesnt work with my country's currency for some reason. LAO KIP.

So i created my own block to pull exchange rates directly from yahoo finance. I successfully got it to pull the exchange rate for my country.
but i would also like to show the exchange rate for the Thai bhat right below it. Can anyone help me? Here is the code below:


Code:
$handle = fopen ("http://finance.yahoo.com/q?s=USDLAK=X", "rb");
   $rf = "";
   do {
       $data = fread($handle, 8192);
       if (strlen($data) == 0) {
           break;
       }
       $rf .= $data;
   } while(true);


   $grab = eregi( "<td class=\"yfnc_tabledata1\"><big>(.*)</big>", $rf, $printing );
   $printing[ 1 ] = str_replace( "<td class=\"yfnc_tabledata1\"><big>", "<big>", $printing[ 1 ] );

   fclose( $handle );
$content = $printing[ 1 ]."";



here is the path to the other rate i want to show along with it:
Code:
http://finance.yahoo.com/q?s=USDTHB=X

can someone help me modify it so that it also shows that rate below the other one



and one more thing, i am having problems putting an image of my country flag next to it. instead it is shown above the block outside of it. how would i post a image next to the posted exchange rate?


thanks in advance..

-OD
Back to top
View user's profile Send private message
Display posts from previous:   
       Lenon.com Forum Index » Blocks All times are GMT - 4 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB 2.0.19 © 2002, 2007 phpBB Group
FlowControl Forums Theme by Disipal Designs

Copyright 1996-2008 - Lenon.com - All Rights Reserved.

This Website is Powered by an Enhanced Version of PHP-Nuke
The Most Advanced Content Management System in the World.

Script generation time: 0.7176 seconds  (PHP 85% - MySQL 15%)
Queries: 17 | Views last 5 mins: 83 | Server load: Passable  (2.43)
Disipal Designs