What I have here is a PHP script that pings a domain and prints out its status either Online or Offline depending if the ping is successful or not. I want it to do exactly what it does but instead of it printing the words Online or Offline I would like it to display an icon image I have of the Online and Offline status. If anyone could help me out and explain to me how to go about doing this I would be indebt to you forsure.
There are 3 parts to this script an Index.php, a ping.php and a style.css below is the code for each.
Image of what it looks like

Index.php
<?
?>
<html>
<head>
<LINK REL=stylesheet TYPE="text/css" HREF="style.css">
</head>
<body>
<?
include_once("ping.php");
echo "
<table><tr><td class=border>
<a href=http://www.domainname.com>Domain Name</a>
</td><td class=border>";
chkuri("www.domainname.com",1);
echo "</td></tr>
</table>";
?>
</body>
</html>
Ping.php
<?
function chkuri($link, $option)
{
if(substr($link,0,4)!="http"){
$link = "http://".$link;
}
$timestart = microtime();
$churl = @fopen($link,'r');
$timeend = microtime();
$diff = number_format(((substr($timeend,0,9)) + (substr($timeend,-10)) - (substr($timestart,0,9)) - (substr($timestart,-10))),4);
$diff = $diff*100;
if (!$churl) {
$message="<center><b><div class=offline>Offline</div></center></b>";
}else{
$message="<center><b><div class=online>Online</div></b></center> "; if($option==1){ $message = $message."[ ping: ".$diff."ms ]";}
}
echo $message;
}
?>
Style.css
a.link { color: green;
font-size: 11px;
text-decoration: none;}
td.border {font-size: 12px;
border: #449944 solid 2px;}
.offline { color: red; }
.online { color: Green; }
Thanks to anyone that can help.
Flawless1974