- file_get_contents: documentation ( source)
- preg_match_all: documentation ( source)
- strip_tags: documentation ( source)
- explode: documentation ( source)
<?php
$url = 'http://middlecoin.com';
$contents = file_get_contents($url);
preg_match_all('/<td>(.*?)<\/td>/s', $contents, $matches);
$ex = explode(" ", strip_tags($matches[0][0]));
$output .= "<span style='color:red; font-weight:bold;'>Balance:</span> ".$matches[0][5]." BTC<br />";
$output .= "<span style='color:#3399ff; font-weight:bold;'>Unexchanged:</span> ".$matches[0][4]." BTC<br />";
$output .= "<span style='color:#51d051; font-weight:bold;'>Immature:</span> ".$matches[0][3]." BTC<br />";
//$output .= "<span style='color:#000000; font-weight:bold;'>Paid:</span> ".$matches[0][6]."<br />";
$output .= "<br /><span style='font-weight:bold;'><a href='middlecoin-graph.php'>MiddleCoin Graph</a></span>";
return $output;
?>