create a php live chat without no load
//Updates the chat
function updateChat(){
$.ajax({
type: "GET",
url: "update.php",
data: {
'state': state,
'file' : file
},
dataType: "json",
cache: false,
success: function(data) {
if (data.text != null) {
for (var i = 0; i < data.text.length; i++) {
$('#chat-area').append($("<p>"+ data.text[i] +"</p>"));
}
document.getElementById('chat-area').scrollTop = document.getElementById('chat-area').scrollHeight;
}
instanse = false;
state = data.state;
setTimeout('updateChat()', 1);
},
});
}
Also in PHP:
- current date into time
- date formate with timestamp php
- error reporting on ini
- '%r%i timeformat php
- datetime print format php
- age date de naissance php
- check php version
- base64 file php
- ->with('success'
- array splice php
- date formatting php
- am pm date format php
- array_unique
- /laravel-2020-07-27.log" could not be opened
- create new project in laravel
- $errors show this error in laravel
- collection empty laravel
- date format php sql
- check session in blade laravel
- FORMATA DATA COM PHP
- find string pos
- clear laravel cache and clear vue
- create a folder php
- PHP text string contains character