Before anything (to PHP chat rooms Free (part 2) you make up, function session_start (), the file name of the user starts to use the session that you have access to the document.Use isset check session the’asm logical “for anything else.Now the file is sent to the aftermarket to keep jobs in the variable $ text of this information.This information, access to information, users will not be held to present the total log.html that fopen “A” in a situation, we have to open the file by file php.net function. Put the file, the file pointer at the end of a single writer. If the file is not an attempt to create. () Then, the picture is one of our messages fvrite function.Be included within the text will be printed. Msgln day and date () function with a user name and time of the meeting was set up by a message that is surrounded by htmlspecialchars () function DIV. XSS protectionFinally, we close the file management using fclose ().
Free to create chat rooms to PHP (part 2)
All other users, and management functions using jQuery; PHP is the only thing recorded a conversation recorded conversations to be written into the manual updates.
To help them, and some of the girls division # chatbok loaded content, even if it does not we will not.
Normally we use the log file, as we did, but this time we read and display file contents.
The essence of what we do is we Ajax. This requirement is not only to send and receive information without thinking of us on this form because it provides a refresh. Also, you asked us for information.We fill our request ajak office. You’ll see why in a second. As you can see above, the search for the three Ajax we use in the aftermarket.
Link: URL range of applications, we will use the file name to save our discussion is log.html.Cache: This will be saved to help protect our files. Recorded interview with this update will ensure that we have every time we need to make a request.We’re looking for success in the control of the information that allows us to add a function.
If you’ve seen other content messaging application will automatically switch to the bottom of the vessel, recorded conversations (# chatbok) If passed, just, and we use a similar function with respect to the height of the container fries. Before and after we made at the request of ajak. If you are looking for a drastic drop of the distribution we use jQuery # chatbok transfer.
First of all, the high variable # chatbok Division oldscrollHeight keep sliding. Before making such a request.Then he returned to the success and high SCROLL # Division chatbok keep changing. nevscrollHeightThen, move beyond these two variables is greater than we compare oldscrollHeight nevscrollHeight statement. We will use a transfer request # chatbok Division.
Now, how consistently we update the information between users can be created and sent the case? Send a question or request information that we can continue to work or formulation.
setInterval (loadLog, 2500); // Consider all ms or 2500 ms X if you want to change other parameters.Our answer to the question lies in the function, and the function will loadLog the setInterval () 2.5 seconds and all the functions and features to explore the deposit by loadLog operation.
We are ready! I hope the system works, and if you have any suggestions on what to give pleasure to welcome you learn to speak. This system is easy to talk, you talk. So, you can work, and women of diverse backgrounds to add icons to create, so the air in your borders, and management.
Here are a few links to call for expansion of this program that you can see if you think about it.
|How To Create PHP chat Rooms Free ( part 2 )|