close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

using a 3rd party API

Thread began 6/24/2013 10:34 am by Jamie | Last modified 6/24/2013 12:15 pm by Jamie | 246 views | 4 replies |

Jamie

using a 3rd party API

Hi guys

I have been asked by a client to see if we can add a foreign exchange feed to a site and have managed to find a free supplier of this (openexchangerates.org) but I have never implemented this sort of thing on a site before and I dont have a scooby as to where or how I should start.

The quick start guide can be seen here: https://openexchangerates.org/quick-start

If you could give me a bit of steerage in how to get this going I would REALLY appreciate it. For example, getting the GBP/USD rate as a feed would be a great start :D

Many thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

their documentation includes sample code to help get you started:
https://openexchangerates.org/documentation#example-php-curl

Sign in to reply to this post

Jamie

i saw that but was a little confused... I seem to have it working to a certain extent. Many thanks for pointint it out Jason

quick question, in this code:

<?php
$file = 'latest.json';
$appId = '67682092accb4a6eb220ec8524d84081';
$ch = curl_init("http://openexchangerates.org/api/{$file}?app_id={$appId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$json = curl_exec($ch);
curl_close($ch);
$exchangeRates = json_decode($json);
printf(
"%s : GBP: %s ",
$exchangeRates->base,
$exchangeRates->rates-> GBP
);
?>



How would I get the output from the printf statement to be divided by 1?

Sign in to reply to this post

Jason ByrnesWebAssist

that would be better addressed to the open exchange support:
https://openexchangerates.org/faq/


see the link at the bottom for the email address to send "Any other question not answered here?" questions to.

Sign in to reply to this post

Jamie

ok thanks Jason... just thought there was a simple way of doing something like that. Will get in touch with them

Cheers again

Jamie

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...