Well, I don't know what the rest of your page looks like or where you would want it, so in general -
The problem is your use of
header(). That is what is causing the .gif to be sent to the browser instead of the html page.
So, something along the lines of:
PHP Code:
if ($stats[1] == "0" || !$stats) {
echo $offline;
}
//online
if ($stats[1] == "1") {
echo $online;
echo '<p><a href="http://example.com" target="_blank"> Listen Live</p></a>';
}
Notes:
1. You'll have to position this in the page where you'd like it displayed.
2. The use of
target="_blank" will accomplish the pop-up window, but it makes use of deprecated, invalid code. You would have to look into a JS solution otherwise.
3. You'll need to correct the
href= attribute to point to the correct page.