Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 11-06-08
Super Moderator
 
Join Date: Jul 2004
Location: Surrey
Posts: 821
Thanks: 0
Thanked 1 Time in 1 Post
sgpratley seems to know their stuff
  Exchange rate feeds

I'm building a site which has some USD and EUR prices included in it and want to show an indication of the current price in GBP.

I've figured out a script that uses the following XML file of rates vs the Euro. supplied by the European Central Bank
http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml

I can use this for Euros, and I could quite easily do 2 conversions to get the USD prices into GBP, but does anyone know of a service that provides this in relation to GBP to start with?

I've seen some osCommerce scripts that reference Oanda.com but that looks like it costs about $1,000 per month?
__________________
Stephen Pratley
Shine Marketing Affiliate Programme Management
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-06-08
Registered User
 
Join Date: Mar 2008
Location: Manchester
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
JonDeals is an unknown quantity at this point
  Re: Exchange rate feeds

I use

Exchange Rates: U.K. Pound Sterling

on a couple of sites. It's free and it works well (updated every 20 mins) - the only thing is you have to do a little preg_match to get the rate from the xml item title as it's not in the most friendly format.

PHP Code:
if(!$xml simplexml_load_file('http://currencysource.ez-cdn.com/GBP.xml')){
    
trigger_error('Error reading XML file',E_USER_ERROR);
}

$rss $xml->channel;

foreach(
$rss->item as $item){

preg_match('/1 GBP \= ([A-Z]+) \(([0-9\.\,]+)\)$/',$item->title,$matches);

if (
$matches[1] != "") {
//Do whatever you want with the code here (insert rates into database etc)
// $matches[1] is the currency code (EUR, USD) etc
// $matches[2] is the rate in comparison to UK £
}


Hope that helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 13-06-08
Super Moderator
 
Join Date: Jul 2004
Location: Surrey
Posts: 821
Thanks: 0
Thanked 1 Time in 1 Post
sgpratley seems to know their stuff
  Re: Exchange rate feeds

Thanks Jon, looks perfect

Thanks for the detail in the code also, saved me a good while figuring it out!
__________________
Stephen Pratley
Shine Marketing Affiliate Programme Management
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Direct Line Mortgages launches on buy.at Dave Booth Finance Vertical Forum 6 19-02-07 01:38 PM
Direct Line Mortgages launches on buy.at Dave Booth buy.at 0 14-02-07 05:13 PM
Banking Google USD cheques... Exchange Rate Matthew Wood Organic Google Search Optimisation 6 07-12-04 05:15 PM
exchange rate for febe payment simon147 Commission Junction - CJ UK 5 15-03-04 03:57 PM
CJ Paid - Whats the exchange rate ? pericom Commission Junction - CJ UK 16 28-10-03 12:01 PM


Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7