3. Process the output file in index.php
<?php
echo "<head>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"progress_bar.css\">";
echo "<meta http-equiv=\"Refresh\" content=\"45\">";
echo "</head>";
echo "<body>";
$filename = "active_channels.php";
$fp = @fopen($filename, "r");
if ($fp) { $array = explode("\n", fread($fp, filesize($filename))); }
$calls = $array[0];
$channels = $array[1];
$sip_total = $array[2];
$sip_online = $array[3];
$stamp = $array[4];
// progress bar maximum
$max_channels = 40;
///////////////////////
$bar_calls = ($calls * 200) / $max_channels;
$bar_channels = ($channels * 200) / $max_channels;
$bar_sip = ($sip_online * 200) / $sip_total;
if ($bar_calls >= 155) { $bar_calls_colour = "bar_yellow.gif"; }<br style="margin: 0px; padding: 0px; color: rgb(46, 139, 87); font-family: Monaco, 'Andale Mono', 'Courier New', Courier, mono; line-height: 1