Facebook Like Chat Script using PHP/SQL Server

Submitted by: 
Visitors have accessed this post 26993 times.

Choose user to chat with.

Sent them instant chat messages just like on Facebook.

Play notification sound on new chat message.

attach Chat database from the db folder to sql server via the SSMS

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Why there isn't a well documented installation process, it is taking too much time to implement, will drop using it.

thank you

Sir do you a mysql version database of this project?

please send me database configuration on php mysql .


its not getting sqlsrv_connect() function as well as 'SQLSRV_CURSOR_KEYSET

I've amended
public $usr = "root";
public $database = "localhost";
public $uid = "sa";
public $pwd = "6666660";
public $dbnm = "example";
public $connectionInfo = null;
public $query = null;
public $serverName = ".\SQL";
public $params1 = array();
public $cursor1 = array("Scrollable" => SQLSRV_CURSOR_KEYSET);

Is there anything else I need to modify it?

updated source code

attach Chat database from the db folder to sql server via the SSMS

from Josiah

how edit database root and password and dbname ?

change them from the chat.php file

from Josiah

How to select and modify the database?

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.