You can wrap it with a div or something to change the font color, am I right?
<?php
function get_host_status($hostName) {
$c = curl_init('http://www.lfsworld.net/hoststatus/?h=' . urlencode($hostName));
curl_setopt($c, CURLOPT_HEADER, 0);
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($c);
curl_close($ch);
return $return;
}
?>
<?php
php
$server_info = file_get_contents('http://www.lfsworld.net/hoststatus/?h=' . urlencode('™DB Private') . '&hostlink');
//echo complete Information from LfS-World
echo $server_info;
?>
http://www.lfsworld.net/hoststatus/?h=[HSK]%20Demo&onlycontent
<?php
<div class="HostName"><span style="color: #000000;">[H</span><span style="color: #FF0000;">S</span><span style="color: #FFFF00;">K</span><span style="color: #000000;">] Demo</span></div>
<div id="Mode" class="DataCont"><div class="Field1">Mode</div><div class="Field2">Demo, Race 5 laps</div></div>
<div id="Track" class="DataCont"><div class="Field1">Track</div><div class="Field2">Blackwood GP</div></div>
<div id="Cars" class="DataCont"><div class="Field1">Cars</div><div class="Field2">FBM</div></div>
<div id="Settings" class="DataCont"><div class="Field1">Settings</div><div class="Field2"> <i><span title="Joining mid-race is allowed">m</span></i></div></div>
<div id="Version" class="DataCont"><div class="Field1">Version</div><div class="Field2">0.5Z9</div></div>
<div id="Conns" class="DataCont"><div class="Field1">Conns</div><div class="Field2">0 / 15</div></div>
<div id="Users" class="DataCont"><div class="Field3"></div></div>
?>
<?php
php
set_include_path(get_include_path() . PATH_SEPARATOR . './library/');
require_once 'JS/Extractor.php';
// insert the name of your server
$hostname = "Blackwood XFG XRG";
$url = "http://www.lfsworld.net/hoststatus/?h=".urlencode($hostname)."&c=1&onlycontent";
$extractor = new JS_Extractor(file_get_contents($url));
$body = $extractor->query("body")->item(0);
$data = $body->extract(array("div", array("div|span")));
// to see the array / for debug you can uncomment the following 3 lines
// echo "<pre>";
// print_r($data);
// echo "</pre>";
$host = $data[0][0];
$mode = $data[1][1];
$track = $data[2][1];
$cars = $data[3][1];
$settings = $data[4][1];
$version = $data[5][1];
$conns = $data[6][1];
$user = $data[7][0];
?>