I actually managed to create a chat program, however at THIS point - its non web-based. but to make it a web-based project, I dont think it would be all that difficult, - providing you have a "host".
As far a local or intranet chat client goes - it took some fiddling, but its now up an running across my home network which consists of 5 different computers.
As for the "host"? - all I did was create a folder on MY machine - then mounted that as a seperate "virtual " hard drive.
For you to create a small but fully functional chat client that would support internet functionality, I suppose you could get some web space on a server some place ( and there are a few free sites out there ) - then simply address your chat program to access that website - followed by the name of the folder you have within that website ( which will be considered as BOTH your IN and OUT box ).
Then your chat program needs to "save" that message into that folder.
If your chat program ( for the SECOND user ) can find YOUR folder,and display it in a text field box...then they would have recieved your message. -and VISA-VERSA ( remember you need 2 in-out folders )
- ( YOUR chat client reads HIS in folder, and HIS end reads YOUR IN folder.)
In essence, your chat program needs to re-check your OTHER users IN-BOX every 2 seconds or so constantly to see if the message has changed so it can add to the previous message on a new line. ( and of course - the other user needs to be able to see YOUR IN-BOX every 2 seconds or so to retrieve YOUR message.
The BEAUTY of using this system on a LAN based platform is that its 100000% HACK-PROOF!
Why? because its not actualy a HEAD-To HEAD ( DIRECT ) connection - this is a sneaky ( passsive ) design -as it simply goes to a virtual drive which is ALREADY behind your own firewall, and just " recieves" only.
The chances of a hacker ( after hes got theough your firewall, then into your computer, then FINDING the "host " drive..THEN being able to read a file that is saved in a format that even Digital Workshop admits it cant open once its published.....now thats what I call LOCK-DOWN.
I suppose all this might sound a little over the top at first - but its not really but the principle is the same - be it LAN or internet based.
An interesting feature of my LAN application:
When another user comes "on-line" or "leaves" - I can see and log it.
Hope this helps - if you need any more info - please feel free.
cheers!