Here's a little jquery snippet which will fetch you the current Bitcoin exchange rate.
The example requests US dollars, and inserts the data in various ticker fields.
<script type="text/javascript">
$(function() {
$(document).ready(function(){
$.getJSON('https://data.mtgox.com/api/1/BTCUSD/ticker', function(data) {
$('#ticker-high').html(data['return'].high.display_short);
$('#ticker-low').html(data['return'].low.display_short);
$('#ticker-avg').html(data['return'].avg.display_short);
$('#ticker-volume').html(data['return'].vol.display_short);
$('#ticker-buy').html(data['return'].buy.display_short);
$('#ticker-sell').html(data['return'].sell.display_short);
});
});
})
</script>
$(function() {
$(document).ready(function(){
$.getJSON('https://data.mtgox.com/api/1/BTCUSD/ticker', function(data) {
$('#ticker-high').html(data['return'].high.display_short);
$('#ticker-low').html(data['return'].low.display_short);
$('#ticker-avg').html(data['return'].avg.display_short);
$('#ticker-volume').html(data['return'].vol.display_short);
$('#ticker-buy').html(data['return'].buy.display_short);
$('#ticker-sell').html(data['return'].sell.display_short);
});
});
})
</script>
Obviously for this to work you need some jquery running. I recommend the use of a content delivery network for this. Cloudflare offers a great service for this called cdnjs.com which also supports ssl.
Hope i could help you. If you like some advice on how to save a complete history of the bitcoin trade networks to your database please leave me a comment.
I also like to say sorry for the recent troubles with the coin-inc collector. There were some errors with the time zone settings on the new server but we fixed it.
Also, the forwarding to the next faucet happens automatically now. You just need to fill the capture and press enter... then again... then again... ;-)
We are working in all spare time on a new setup which will further ease the collection of free Bitcoin taking out the need to change between the faucet sites. If you like to support the development please find a donation address at coin-inc.com.
Have a good day and see you soon forum!
Tim