Bitcoin Forum

Bitcoin Business => Payment processing => Topic started by: gensen on July 11, 2012, 11:40:26 AM

Title: Bitcoin Calculations
Post by: gensen on July 11, 2012, 11:40:26 AM
Hi,

Does someone no how you easy can calculate on your website the amount of bitcoins you get if want to spent lets say 100 Euro?

Is the only way whit the Mtgox API ticker?
Title: Re: Bitcoin Calculations
Post by: dodoking on July 12, 2012, 09:04:53 PM
Yes I could code it in php if you need a visual example.

The best way would be to read from an api (mt.gox, btc-e, or vircurex) and do the calculations in php.

You could also make a cron job to store the price in a database every 1-5 minutes so that your webpage pulls the price from a local database and not have to connect to the api for every users page visit. This method would be better for your server.