PHP Chat with AJAX
PHP chat is a most common as these days with the help of AJAX I share to you my basic scripts with autorefresh at first you need to have localhost server or any web site hosting that supports php. these are my scripts Create file for your chat display ex. response.php code: put inside the data to be displayed second file index.php code: pop-up text < html > < head > < script src = "http://code.jquery.com/jquery-latest.js" ></ script > < script > $ ( document ). ready ( function () { $ ( "#responsecontainer" ). load ( "response.php" ); var refreshId = setInterval ( function () { $ ( "#responsecontainer" ). load ( 'response.php?randval=' + Math . random ()); } , 1000 ); $ . ajaxSetup ( { cache : false } ); } ); </ script > </ head > < body > < iframe src = "main.php" width = "100%" height = "25%" ...


Comments
Post a Comment