'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($im, 0, 0, 0);
$black = imagecolorallocate($im, 1, 0, 0);
imagecolortransparent($im, $bg);
imagestring($im, 4, 0, 0, $ppbtc ."BTC", $black);
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>