Author

Topic: Realtime Pricing $ to BTC BBCode Image Service by BitcoinMint.US (Read 3347 times)

newbie
Activity: 12
Merit: 0
Can this feature/code be made into a wordpress plugin, if it hasn't already??
sr. member
Activity: 284
Merit: 251
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.
member
Activity: 114
Merit: 10
Source for similar script if you want to host it yourself, requires php gd & json.
Code:
$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]
sr. member
Activity: 284
Merit: 251
Reserved for future post.
sr. member
Activity: 284
Merit: 251


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]


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]



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