Bitcoin Forum
May 11, 2024, 09:23:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: USD to BTC Pricing Image Script (configurable size, colors)  (Read 529 times)
OgNasty (OP)
Donator
Legendary
*
Offline Offline

Activity: 4732
Merit: 4248


Leading Crypto Sports Betting & Casino Platform


View Profile WWW
June 23, 2015, 11:56:31 PM
 #1

USD to BTC Pricing Image Script:

We have made available a configurable script courtesy of nonnakip at http://dev.nastyfans.org in the "Nasty Tools" section that allows you to price things in USD and it is converted to an image showing the BTC amount.  Samples below showing the script options.



Code:
http://langrock.org/stats/btcval.png?usd=500&size=15&bg=dddddd&fg=006600

or more simply...


Code:
http://langrock.org/stats/btcval.png?usd=500

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715419416
Hero Member
*
Offline Offline

Posts: 1715419416

View Profile Personal Message (Offline)

Ignore
1715419416
Reply with quote  #2

1715419416
Report to moderator
1715419416
Hero Member
*
Offline Offline

Posts: 1715419416

View Profile Personal Message (Offline)

Ignore
1715419416
Reply with quote  #2

1715419416
Report to moderator
coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
June 24, 2015, 12:05:52 AM
 #2

That's cool! Did you do this with PHP's imagettftext(); ??
This could be useful for bloggers posting on their site or even here at the forum using the IMG tags.
It auto updates right? Each time the PNG is called it grabs the current market rate and re-renders the image?

OgNasty (OP)
Donator
Legendary
*
Offline Offline

Activity: 4732
Merit: 4248


Leading Crypto Sports Betting & Casino Platform


View Profile WWW
June 24, 2015, 12:15:26 AM
 #3

It auto updates right? Each time the PNG is called it grabs the current market rate and re-renders the image?

Yes.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
mattjack
Full Member
***
Offline Offline

Activity: 120
Merit: 100

Matt or Jack? Why not both!


View Profile
June 24, 2015, 01:47:40 AM
 #4

If you'd like a script with more options and more accurate exchange rate without the begging for a donation, try this:
$25 =
$35 =
$15 =

Script courtesy of NastyFans and options to use it can be found at http://dev.nastyfans.org in the "Nasty Tools" section.

Bro I just wanna say that this jab at TBZ in another thread made my day  Cheesy
MystPhysX
Hero Member
*****
Offline Offline

Activity: 597
Merit: 500


View Profile
June 24, 2015, 02:08:06 AM
 #5

Where does it scrape the conversion rate from?

Also this is awesome, thanks.

OgNasty (OP)
Donator
Legendary
*
Offline Offline

Activity: 4732
Merit: 4248


Leading Crypto Sports Betting & Casino Platform


View Profile WWW
June 24, 2015, 03:29:59 AM
 #6

Where does it scrape the conversion rate from?

Bitstamp, I believe.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
Razerglass
Legendary
*
Offline Offline

Activity: 1036
Merit: 1000


https://bmy.guide


View Profile
June 24, 2015, 03:36:33 AM
 #7

Where does it scrape the conversion rate from?

Bitstamp, I believe.

nice script I will use this Smiley

██░                                             
 ▓██▓░                                           
  ▓█████▓▒░                                  ░▒██░
    ▓███████▓▒░                           ░▓▓██▓ 
      ▒█████████▓▒                     ░▓████▓   
        ░█████▓████▓▒                 ▓████▓░   
          ░▓███▓▓▓▓███▓░            ▒██▓▓█▒     
             ▓██▓▓▓▓▓▓██▒         ░███▓▓█▒       
               ▓█▓▓▓▓▓▓▓█▓       ▓███▓▓█▒       
                ▒██▓▓▓▓▓▓██▒   ▒███████▓         
                 ░██▓▓▓▓▓▓▓█▓░  ▒▓▓▓▓▓▓         
                   ▓█▓▓▓▓▓▓▓▓█▓▒                 
                    ▒█▓▓▓▓▓▓▓▓▓▓█▓▓▓▓▓▓▓▒▒░     
                      ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒   
                   ░▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███   
              ▒▓▓█████▓▓▓▓▓▓▓▓▓████▓▓▓▓▒▒░   ░   
         ▒▓██████▓▓▓▓▓▓▓▓▒▒▒▒▒░                   
|
|
🛵 Connecting Travellers All Around The World 🛵 

Socially Powered Search Engine for the Travel & Tourism Industry
|

█████████████████████████
██ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ██
██ ███████████▀     ██ ██
██ ██████████▌   ▄▄▄██ ██
██ ██████████   ██████ ██
██ ███████          ██ ██
██ ███████▄▄▄   ▄▄▄▄██ ██
██ ██████████   ██████ ██
██ ██████████   ██████ ██
██ ██████████   ██████ ██
██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

█████████████████████████
██ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ██
██ █████████████▀█████ ██
██ ███ ▀█████▀      ▀█ ██
██ ███     ▀▀      ▐██ ██
██ ███▌            ███ ██
██ ████▌          ▄███ ██
██ ██████       ▄█████ ██
██ ████▄▄▄▄▄▄▄████████ ██
██ ███████████████████ ██
██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

█████████████████████████
██ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ██
██ ████████████▀▀▀████ ██
██ ████████▀▀     ████ ██
██ █████▀    ▄▀  ▐████ ██
██ ██▀     ▄▀    ▐████ ██
██ ████▄▄ █▀     █████ ██
██ ██████ ▄▄█   ▐█████ ██
██ ████████████ ██████ ██
██ ███████████████████ ██
██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
|
Whitepaper
One-Pager
Ann Thread
|
Medium
Youtube
Instagram
icanscript
Hero Member
*****
Offline Offline

Activity: 686
Merit: 502



View Profile
June 24, 2015, 03:47:04 AM
 #8

work for other currencies? eur, gbp?
OgNasty (OP)
Donator
Legendary
*
Offline Offline

Activity: 4732
Merit: 4248


Leading Crypto Sports Betting & Casino Platform


View Profile WWW
June 24, 2015, 03:48:37 AM
 #9

work for other currencies? eur, gbp?

No.  Just USD.  Embarrassed

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
icanscript
Hero Member
*****
Offline Offline

Activity: 686
Merit: 502



View Profile
June 24, 2015, 03:57:48 AM
 #10

Open source at all? Id be happy to add that functionality.
OgNasty (OP)
Donator
Legendary
*
Offline Offline

Activity: 4732
Merit: 4248


Leading Crypto Sports Betting & Casino Platform


View Profile WWW
June 24, 2015, 04:00:58 AM
 #11

Open source at all? Id be happy to add that functionality.

No.  This script was designed for a single purpose a long time ago.  I just thought I'd post it here since it seemed to have been forgotten.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
icanscript
Hero Member
*****
Offline Offline

Activity: 686
Merit: 502



View Profile
June 24, 2015, 04:02:05 AM
 #12

Open source at all? Id be happy to add that functionality.

No.  This script was designed for a single purpose a long time ago.  I just thought I'd post it here since it seemed to have been forgotten.

ah, well a great script anyway Smiley Thanks for the share.
amacar1
Hero Member
*****
Offline Offline

Activity: 707
Merit: 501


View Profile
June 24, 2015, 12:16:05 PM
 #13

Open source at all? Id be happy to add that functionality.

I have similar script, but it is more powerfull (check below for extra parameters), will put it on github when will have time or can sell it to you very cheap.

I made this:

Link is:
Code:
[img] http://amacar.hostei.com/generateImage/index.php/?VALUE=10&CUR=USD&TYPE=24h_avg&TIMESTAMP=YES&PRECISION=7&COLOR=00FFFF&SIZE=12&FONT=calibri [/img]

Parameter VALUE is just amount you want to convert to BTC
Parameter CUR is currency and could be any value from: https://bitcoinaverage.com ('USD', 'EUR', 'GBP', 'CAD'...), default is USD.
Parameter TYPE could be 'ask', 'bid', '24h_avg', 'last', default is last.
If parameter TIMESTAMP is 'yes', then timestamp is added to image, otherwise no. Default is no timestamp added.
Parameter PRECISION allows you to round calculated value to decimals. Default is 5.
Parameter COLOR will change text color. Accept HEX values, default is black.
Parameter SIZE is size of text, default is 11.
FONT is font of text, default is arial.

Currently supported fonts (can add more):
coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
June 24, 2015, 12:29:26 PM
 #14

Open source at all? Id be happy to add that functionality.

I have similar script, but it is more powerfull...[snip]

You should create your own thread. It's kind of rude to hijack someone else's thread and post your stuff and call it better. Not cool.

Emerge
Legendary
*
Offline Offline

Activity: 854
Merit: 1000



View Profile
June 24, 2015, 03:37:20 PM
 #15

Great work OgNasty!

just my BTC

Perfect. works like a charm
Pages: [1]
  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!