Bitcoin Forum
May 30, 2024, 12:22:51 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2  All
  Print  
Author Topic: UPDATE: Free BTC Converter v2.4 - Now with color! *Automatically Updating PNGs*  (Read 4683 times)
tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
November 08, 2013, 02:42:51 AM
Last edit: March 02, 2015, 06:44:15 PM by tim-tams
 #1

[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:

Eternity
Full Member
***
Offline Offline

Activity: 196
Merit: 100



View Profile
November 08, 2013, 09:23:58 AM
 #2

What does this convert to ?
tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
November 08, 2013, 01:08:30 PM
 #3

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.

tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
November 13, 2013, 10:08:05 PM
 #4

Updated the tool a bit. You can now convert from BTC to USD. Feedback welcome!

Eternity
Full Member
***
Offline Offline

Activity: 196
Merit: 100



View Profile
November 14, 2013, 02:03:23 PM
 #5

Cool stuff
Bobbyd
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
November 14, 2013, 04:51:18 PM
 #6

Can you do one for BTC to GBP?
Eternity
Full Member
***
Offline Offline

Activity: 196
Merit: 100



View Profile
November 14, 2013, 09:02:30 PM
 #7

Use xe.com to convert to whatever currency you desire Smiley
Martijnvdc
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


View Profile
November 15, 2013, 08:08:01 AM
 #8

NICE!!
How about EUR/BTC or some cryptocurrencies?
tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
November 15, 2013, 09:23:24 PM
 #9

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.

Martijnvdc
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250


View Profile
November 15, 2013, 09:24:39 PM
 #10

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
tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
November 16, 2013, 12:28:00 AM
 #11

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!

tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
November 19, 2013, 02:14:18 AM
 #12

I've made this project A LOT easier to use. Please read about the update in the OP and try out the new setup!

pxlcoin
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 19, 2013, 04:56:52 AM
 #13

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
unknownfame
Full Member
***
Offline Offline

Activity: 150
Merit: 100



View Profile
November 19, 2013, 05:33:48 AM
 #14

Thanks it's awesome! Will help lots of buyers/sellers.

DISCIPLINA — The First Blockchain For HR & Education
From core developers of Cardano, PoS minting, unique Web Of Trust & Privacy algorithms. Be the first, join us!
  WEBSITE  TELEGRAM  ANN  BOUNTY  LINKEDIN  WHITEPAPER  Referral Program 5%
tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
November 19, 2013, 01:28:52 PM
 #15

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'];
        }


pxlcoin
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
November 23, 2013, 05:33:27 AM
 #16

Thanks, but there's some HTTPS error with file_get_contents for me :\
tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
January 04, 2014, 09:54:54 PM
 #17

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!

tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
January 31, 2014, 08:08:03 PM
 #18

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.

tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
April 28, 2014, 03:31:37 PM
Last edit: March 02, 2015, 06:45:18 PM by tim-tams
 #19

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.

tim-tams (OP)
Sr. Member
****
Offline Offline

Activity: 479
Merit: 252


You, Me, and BTC: *Your* Liberty & Bitcoin Podcast


View Profile WWW
July 02, 2014, 02:01:12 PM
Last edit: March 02, 2015, 06:45:29 PM by tim-tams
 #20

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.

Pages: [1] 2  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!