trying to get php to give me new lines and its not working even after goggling around. I'm using the \r\n and it does not display but also does not give me a new line carriage return.
Any suggestions would be greatly appreciated!
<?php
if (!$socket = @fsockopen("xxx.xxx.xxx.xxx", 22, $errno, $errstr, 1))
{
echo "<font color='red'><strong>servername.domain.com(xxx.xxx.xxx.xxx) is Offline!\r\n</strong></font>";
}
else
{
echo "<font color='green'><strong>servername.domain.com(xxx.xxx.xxx.xxx) is Online!\r\n</strong></font>";
fclose($socket);
}
if (!$socket = @fsockopen("xxx.xxx.xxx.xxx", 22, $errno, $errstr, 1))
{
echo "<font color='red'><strong>servername2.domain.com(xxx.xxx.xxx.xxy) is Offline!\r\n</strong></font>";
}
else
{
echo "<font color='green'><strong>servername2.domain.com(xxx.xxx.xxx.xxy) is Online!\r\n</strong></font>";
fclose($socket);
}
?>
` instead. – Dave Chen Dec 14 '13 at 04:04