As mentioned before, I wanted to create a widget for my Netvibes homepage to allow me to see the current exchange rate between the US dollar and the British pound. This is partly because I’m currently paid in dollars so I’m interested to see how much I’ll get in pounds, plus it was also a good opportunity to remind myself how to create a widget.
It was actually a bit more straightforward than I’d been expecting. In order to keep the actual widget quite small, I have a separate PHP script to find out the latest rate – this is retrieved from The Money Converter.com, who provide an RSS XML feed with the latest rate. The PHP script parses the XML to find the current USD/GBP rate, and outputs this as text.
The widget retrieves this text using Ajax, then works out the exchange rate both ways and displays them. It also allows you to enter a default value in USD to convert to GBP. This is what the widget looks like on my Netvibes home page:
I created the icon in GIMP, just a basic 16×16 GIF and using the text editor to add the two currency symbols.
My widget can be seen on the Netvibes Ecosystem.

0 Comments.