Jump to content
MakeWebGames

[mccode] Ajax chat script


seanybob

Recommended Posts

Re: Ajax chat script

it works for anything... Look at chat.php

At the top, you will notice the only php segment in that page is the headers for v1.1

I imagine they are close to lite - if not, just copy/paste your LITE headers over it

probably same for v2 as well

Link to comment
Share on other sites

Re: Ajax chat script

Good stuff. Looking at your spam words, my users must play your games as well. LOL.

What about protecting against HTML code? I had a problem with my chat system and I had to do a search and replace for all html tags.

Link to comment
Share on other sites

Re: Ajax chat script

 

it works for anything... Look at chat.php

At the top, you will notice the only php segment in that page is the headers for v1.1

I imagine they are close to lite - if not, just copy/paste your LITE headers over it

probably same for v2 as well

Yeah, these are the Lite Headers.

Does this update automatically when a new post is entered, or does the user have to refresh, or is it on like a 5 second cycle?

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 4 months later...

Re: [mccode] Ajax chat script

 

one of the simplest ajax chat scripts you will find. No sql, just a text file ;)

First, create a php file (I called mine w.php)

Remember what you called it. If you are not confident of your coding skills, just keep the names I have for all the files.

w.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Notice at the top of that above file it has "chat.txt"? That is a reference to the chat text file (given below). You can use that name, or create your own. I will mention everywhere it needs to be changed if you decide to change it.

Now...

chat.txt

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Now for

chat.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Pretty simple stuff. Keep in mind while renaming files...

if you wish to change a file (say, w.php) then search chat.php for the string "w.php", and everywhere that occurs change it to the new filename you created.

I'm 80% sure you have to chmod the chat.txt file to 777, but I may be wrong.

You can set the number of lines it saves in the text file in the w.php file (its a variable near the top)

Lemme know how it works out for ya ;)

Link to comment
Share on other sites

  • 3 weeks later...

Re: [mccode] Ajax chat script

Warning: main(globals.php) [function.main]: failed to open stream: No such file or directory in /home/downsy00/public_html/chat.php on line 3

Warning: main(globals.php) [function.main]: failed to open stream: No such file or directory in /home/downsy00/public_html/chat.php on line 3

Fatal error: main() [function.require]: Failed opening required 'globals.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/downsy00/public_html/chat.php on line 3

if some one wud does this for free pm me plz

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...