$exchangename = " mtgox ";
$exchangelink = "https://mtgox.com";
// input rss header
//if ( $image == true )
//addfeedimage(imageurl, imagelink,imagetitle)
//echo $format;
$link = "http://bitcoin.gw.gd";
$title = "bitcoin price feed";
$description = "RSS feed providing the latest bitcoin price, from " . $exchangename . " API, provided by http://bitcoin.gw.gd";
$self = "http://p.b.gw.gd/pf/bitcoin_price_feed.php";
$rssfeed = feedheader($date, $ttl, $format, $title, $link, $description, $self);
// add data / RSS items
if ($format == "short") {
    require_once dirname(__FILE__) . "/../lib/cachemtgoxrate.php";
    $ticker = cachemtGoxRate($fromcurrency = "USD", "last_local");
    $title = $ticker;
    //$link .= "&format=short";
    $description = "bitcoin price at date " . $date . " ";
}
if ($format == "fullticker") {
    require_once dirname(__FILE__) . "/../lib/cacheticker.php";
    $ticker = cachegetBitcoinPrice("text", "vertical");
    $title = $ticker;
    //$link .= "&format=fullticker";
    $description = "bitcoin price at date " . $date . " ";
}
$rssfeed .= addfeeditem($title, $link, $description, $timestamp, $ticker);
// add RSS footer
$rssfeed .= feedfooter();
// echo the full RSS feed
echo $rssfeed;
<?php

require_once dirname(__FILE__) . "/../lib/cacheticker.php";
$typeticker = "html";
if (isset($_GET)) {
    if (isset($_GET['type'])) {
        if ($_GET['type'] == "html" or $_GET['type'] == "text") {
            $typeticker = $_GET['type'];
        }
    }
}
//echo $typeticker;
echo cachegetBitcoinPrice($typeticker, "line", "EUR");
<h2><a id="htmltools">Bitcoin HTML tools</a></h2>
<table>
<tr> <td>EUR ticker in HTML format</td><td><?php 
require "./ti/ticker_eur_btc.php";
?>
</td><td><a href="http://p.b.gw.gd/ti/ticker_eur_btc.php">HTML BTC/EUR ticker</a> </td></tr>
<tr> <td>USD ticker in HTML format</td><td><?php 
require "./ti/ticker_usd_btc.php";
?>
</td><td><a href="http://p.b.gw.gd/ti/ticker_usd_btc.php">HTML BTC/USD ticker</a> </td></tr>
</table>

<h2><a id="texttools">Bitcoin TEXT tools"</a>Bitcoin Text tools</h2>
<table>
<tr> <td>EUR ticker in TEXT format</td><td><?php 
echo cachegetBitcoinPrice("text", "line", "EUR");
?>
</td><td><a href="http://p.b.gw.gd/ti/ticker_eur_btc.php?type=text">TEXT BTC/EUR ticker</a> </td></tr>
<tr> <td>USD ticker in TEXT format</td><td><?php 
echo cachegetBitcoinPrice("text", "line", "USD");
?>
</td><td><a href="http://p.b.gw.gd/ti/ticker_usd_btc.php">TEXT BTC/USD ticker</a> </td></tr>
</table>

<?php 
include "footer.php";
?>
</body>
</html>