Connecting Tech Pros Worldwide Help | Site Map

php IM advice

  #1  
Old September 30th, 2005, 07:35 PM
Mickey
Guest
 
Posts: n/a
Hi,

I am writing to ask if anyone could let me know of any tutorials...

I want to make an add-on for my site. What I want to do is add an
instant messanger feature, where members can IM each other.

Preferably, I want to implement this without adding a database table.
I hope to use a combination of both PHP & Javascript. Is this a
realistic approach?

I have looked into this and can't find much information on it.
If anybody has ever done such a feature for their site and has any
articles/tutorials.. on this subject i'd aprechiate it if they could
pass them on. Or also any opinions.

Thanks in advance,
Mikey

  #2  
Old October 14th, 2005, 09:45 AM
Oliver Saunders
Guest
 
Posts: n/a

re: php IM advice


> Preferably, I want to implement this without adding a database table.[color=blue]
> I hope to use a combination of both PHP & Javascript. Is this a
> realistic approach?[/color]

Its doable. But I think using a database would be easier and give better
performance. Then again if you have no experience of database the former
probably isn't true.

I'd use an XML file.

- Have a form with name and message field or whatever you want. File
called "mainsite.html" say. Give the form action "addim.php"
- In "addim.php" make sure you don't echo anything and just write the
code to add the message to the XML file and then use Header("Location:
mainsite.html") to send the user back to the same page. The user should
see nothing change at all but the processing will have been completed.
- Back in mainsite.html use a frame (anything that you can use to
display something from an external file) to show your instant messages.
Then that will automatically call "parseims.php" every time
"mainsite.html" is loaded
- Create "parseisms.php" to display the last 5 or so entries in the XML
file, and possibly delete those above to keep things fast.
- You could use JS in mainsite.html to refresh the contents of the frame
periodicly which you wouldn't be able to do with inline html code such
as a layer or table. Actually thinking about it you might but its
harder, depends how much you dislike frames.

I might try something like this for my own site come to think of it

Ollie
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
cross platform problem - advice needed Ian Davies answers 30 August 4th, 2006 08:15 PM
cross platform problem - advice needed Ian Davies answers 27 August 2nd, 2006 05:45 AM
cross platform problem - advice needed Ian Davies answers 28 August 2nd, 2006 05:45 AM
PHP image generation & caching Mr WZ Boson answers 6 July 17th, 2005 11:01 AM