Pages:
Author

Topic: UPDATE: Free BTC Converter v2.4 - Now with color! *Automatically Updating PNGs* - page 2. (Read 4753 times)

sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
Haven't bumped this in awhile but I just recently made a cool update. We now support conversion to and from bits. Enjoy! I'm working on updating the code too but you all won't notice much of that. As usual, please let me know if you have questions, comments, or suggestions!

Convert!

Another sample: $100 at Bitstamp is



From OP:
Medium Update (6/28): We added support for bits too, which are 1/1,000,00th of a Bitcoin.
sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
Bumping this just for fun. It's still available and functional and I'm still looking for suggestions. Just recently fixed it up for our new website too.

Here's a sample, 1 BTC at the Bitstamp rate.
sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
I noticed that lots of people were finding this tool when searching for things like "convert btc to mbtc." This conversion is extremely simple (just multiply or divide by 1000) but I figured I'd create a tool for the lazy people, so here it is. All you have to do is input a value in BTC or mBTC and select how to convert. Then the corresponding value will be displayed for you.

I'm always willing to add exchanges or currencies to the original tool as well, so let me know if you need anything.
sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
I just wanted to bump this because it should be useful for a lot of people. I'm still looking for suggestions to improve it if anyone has any good ideas!
newbie
Activity: 11
Merit: 0
Thanks, but there's some HTTPS error with file_get_contents for me :\
sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
I've made this project A LOT easier to use. Please read about the update in the OP and try out the new setup!

Hi tim-tams;

I'm interested in creating something similar (basically, grabbing prices from exchanges and posting). Can you message me perhaps and tell me what you use to grab the exchange prices? Currently I'm trying to use (PHP) either file_get_contents or CURL. The former doesn't work for HTTPS requests and I can't quite figure out the latter, so I'd appreciate if you threw me some help.

Thanks,
pxlcoin

It is just PHP and file_get_contents. I might have a little competition now but oh well. Wink If you want a new exchange, you'll just have to find their json API, get the URL, and update the indexes of the array to match the API.

if ($exchange == 'btc-e' or $exchange == 'btce'){
        $url = 'https://btc-e.com/api/2/btc_usd/ticker';
        $content = file_get_contents($url);
        $json = json_decode($content, true);
        $rate = $json['ticker']['last'];
        }
elseif ($exchange == 'mtgox'){
        $url = 'http://data.mtgox.com/api/2/BTCUSD/money/ticker';
        $content = file_get_contents($url);
        $json = json_decode($content, true);
        $rate = $json['data']['last']['value'];
        }
elseif ($exchange == 'coinbase'){
        $url = 'https://coinbase.com/api/v1/currencies/exchange_rates';
        $content = file_get_contents($url);
        $json = json_decode($content, true);
        $rate = $json['btc_to_usd'];
        }
else {
        $url = 'https://www.bitstamp.net/api/ticker/';
        $content = file_get_contents($url);
        $json = json_decode($content, true);
        $rate = $json['last'];
        }

full member
Activity: 150
Merit: 100
Thanks it's awesome! Will help lots of buyers/sellers.
newbie
Activity: 11
Merit: 0
I've made this project A LOT easier to use. Please read about the update in the OP and try out the new setup!

Hi tim-tams;

I'm interested in creating something similar (basically, grabbing prices from exchanges and posting). Can you message me perhaps and tell me what you use to grab the exchange prices? Currently I'm trying to use (PHP) either file_get_contents or CURL. The former doesn't work for HTTPS requests and I can't quite figure out the latter, so I'd appreciate if you threw me some help.

Thanks,
pxlcoin
sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
I've made this project A LOT easier to use. Please read about the update in the OP and try out the new setup!
sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
NICE!!
How about EUR/BTC or some cryptocurrencies?

Added conversion to and from EUR. Just use the same URLs and add &eur=1 to the end.

I also added a frombtc.php page so that it wouldn't have to be tousd.php in case you were using Euros.

Hope this works, tips welcome!

Also, I probably won't do this for other cryptos because there's just too many to make this really worthwhile.
Thank you very much. Smiley

You are quite welcome!
sr. member
Activity: 322
Merit: 250
NICE!!
How about EUR/BTC or some cryptocurrencies?

Added conversion to and from EUR. Just use the same URLs and add &eur=1 to the end.

I also added a frombtc.php page so that it wouldn't have to be tousd.php in case you were using Euros.

Hope this works, tips welcome!

Also, I probably won't do this for other cryptos because there's just too many to make this really worthwhile.
Thank you very much. Smiley
sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
NICE!!
How about EUR/BTC or some cryptocurrencies?

Added conversion to and from EUR. Just use the same URLs and add &eur=1 to the end.

I also added a frombtc.php page so that it wouldn't have to be tousd.php in case you were using Euros.

Hope this works, tips welcome!

Also, I probably won't do this for other cryptos because there's just too many to make this really worthwhile.
sr. member
Activity: 322
Merit: 250
NICE!!
How about EUR/BTC or some cryptocurrencies?
full member
Activity: 196
Merit: 100
Use xe.com to convert to whatever currency you desire Smiley
newbie
Activity: 20
Merit: 0
Can you do one for BTC to GBP?
full member
Activity: 196
Merit: 100
sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
Updated the tool a bit. You can now convert from BTC to USD. Feedback welcome!
sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
What does this convert to ?

It converts USD to BTC. See the "value" field in the URL? That's where you put the USD amount then it converts to BTC in the image. I'll try to clarify that better.
full member
Activity: 196
Merit: 100
What does this convert to ?
sr. member
Activity: 479
Merit: 252
You, Me, and BTC: *Your* Liberty & Bitcoin Podcast
[quick link to the converter]

I've been working on a price converter that generates an image and automatically updates with the exchange rate. This is perfect for when you are selling something and want to post a Bitcoin price that changes as the exchange rate fluctuates. You can also use it to post the value of 1 BTC so people can see the exchange rate on your website or anywhere else you like. It began when I was helping out with a "for sale" thread here on the forums, but since then I've been slowly expanding it and adding features as time permits.

Please let me know if you have ANY ideas or suggestions for how I could improve this tool.

Awesome 2.4 Update (3/1/15): Color Support!
This should be self explanatory but I think it's pretty darn awesome. Now you can make the image fit in with whatever your website's theme looks like. As usual, if you're willing, please take some time to test it out and let me know if you find any bugs. Thanks a ton!



2.3 Update (7/13/14): Just finished a fairly major code update. You all won't really notice the changes, but I need some people to test it out and let me know if you find any bugs. If it ever gives you a strange result or an error or anything, please tell me. Thanks!

Medium 2.2 Update (6/28/14): We added support for bits too, which are 1/1,000,00th of a Bitcoin.

Smaller 2.1 Update (1/31/14): There is now a tool for the lazy people who want to convert between BTC and mBTC (and now bits, Satoshis, USD and Euros as well).

Big 2.0 Update (11/18/13)
I have made it MUCH simpler to generate a URL for any conversion you like. All you have to do is make a few selections and the URL will be automatically created so you can copy and paste it wherever you want.

It looks like this (very old screenie - see lots of new details above).

Hope this helps everyone! Simply visit the main page to try it out.

Note to BCT users: This forum's fail of an image proxy does not allow you to pass more than one PHP variable through a URL. This means that you can choose a value to convert but everything else goes the the default settings (Coinbase rate, USD, etc.) This still works but can be annoying. Complain to theymos if you feel the need. Or simply use this tool on any other website. This seems to have been fixed, so now the converter should be perfect for anyone posting prices here! No Javascript or anything necessary - just a simple image!



If you have any questions or suggestions, let me know.
Donations to this project would be darn wonderful if you're willing.

13hK4GefkMYyk1iwH8QzAzYpAtqoNkSWju

Total donated so far:
Pages:
Jump to: