Bitcoin Forum

Economy => Marketplace => Topic started by: BitcoinMint.US on February 20, 2012, 03:35:59 PM



Title: Realtime Pricing $ to BTC BBCode Image Service by BitcoinMint.US
Post by: BitcoinMint.US on February 20, 2012, 03:35:59 PM
http://www.bitcoinmint.us/BitcoinMintBanner.gif (http://www.bitcoinmint.us)

www.BitcoinMint.US (http://www.bitcoinmint.us) is now offering use of our BBCode pricing script to help sellers on this forum accurately price their goods in BTC.
Feel free to inquire with any questions and don't forget to let us know what you think of our service.


Code:
[img]http://www.bitcoinmint.us/cgi-bin/btcval?usd=12.5[/img]
http://www.bitcoinmint.us/cgi-bin/btcval?usd=12.5

Code Variables (add "&" and then the code to use):
usd  = the US dollar amount
size = the size of the font
fg   = the color of the font
bg   = the color of the background

Code:
[img]http://www.bitcoinmint.us/cgi-bin/btcval?usd=12.5&size=15.5&fg=ff0088&bg=0000ff[/img]
http://www.bitcoinmint.us/cgi-bin/btcval?usd=52.52&size=15.5&fg=008800&bg=ffffff


Donations for this service in BTC can be sent to: 123HoqWtvujHtAP3kywFyj6TnVEmEADVme


Title: Re: Realtime Pricing $ to BTC BBCode Image Service by BitcoinMint.US
Post by: BitcoinMint.US on February 20, 2012, 03:52:32 PM
Reserved for future post.


Title: Re: Realtime Pricing $ to BTC BBCode Image Service by BitcoinMint.US
Post by: alkhdaniel on February 20, 2012, 06:49:11 PM
Source for similar script if you want to host it yourself, requires php gd & json.
Code:
<?php
$opts 
= array(
  
'http'=> array(
    
'method'=>   "GET",
    
'user_agent'=>    "MozillaXYZ/1.0"));
$context stream_context_create($opts);
$json file_get_contents('https://mtgox.com/code/data/ticker.php'false$context);
$jdec json_decode($json);
$ppbtc round($_GET["usd"]/$jdec->{'ticker'}->{'sell'}, 2);
$length strlen($ppbtc);
//add [$length += 3;] if you want "BTC" at the end:
$im imagecreatetruecolor(($length*8), 13);
$bg imagecolorallocate($im000);
$black imagecolorallocate($im100);
imagecolortransparent($im$bg);
imagestring($im400$ppbtc ."BTC"$black);
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>


Code:
[img]http://74.63.229.70/convert.php?usd=10[/img]
http://74.63.229.70/convert.php?usd=10


Title: Re: Realtime Pricing $ to BTC BBCode Image Service by BitcoinMint.US
Post by: BitcoinMint.US on February 20, 2012, 07:24:29 PM
Source for similar script if you want to host it yourself, requires php gd & json.

Cool.  Thanks for posting.  They should assimilate your script into the forum software.


Title: Re: Realtime Pricing $ to BTC BBCode Image Service by BitcoinMint.US
Post by: CryptoGolfer on April 29, 2012, 11:32:52 PM
Can this feature/code be made into a wordpress plugin, if it hasn't already??