#native_company# #native_desc#

PHP-Based Chat Room Page 2

By Mike Hall
on July 30, 2000

We’re nearly ready write our message file. All we
need are headers and footers. Start simple with
the headers:


// It's important that there are no newline

// characters except at the end of the string.

// This keeps all the headers together.

$header "<html><body bgcolor="#000000" text="#ffffff">n";


We want the message screen to auto refresh so people
viewing the site can see new posts. In preference
to using JavaScript, I use an META refresh,
principally because it’s more likely to be supported
client-side. I also don’t want the search engines
indexing my message file. So we refine $header
to :


$header "<html><head><meta http-equiv="refresh" content="8">".

"<meta name="robots" content="noindex"></head>".

"<body bgcolor="#000000" text="#ffffff">n";


In the file footer I tend to put a little copyright
information as well as close the tags I opened in the


$footer "<p align="center"><font color="#000000">".

"&copy; Mike Hall 2000</font></p></body></html>";


Wrapping the copyright in <font color="#000000">
means that unless selected it’ll be invisible against
the equally #000000 background. This just
stops it being intrusive.