Create Chat like facebook


This paper simply fill spare time and try to review the back so as not to forget about the PHP programming and learning a bit about the framework.

Possible and certainly we often open facebook and meet friends – friends that we rarely meet. Facebook also provides features that can assist in communicating with our friends the chat. With the chat we can share information and get acquainted with new friends. But if examined, how to make chat a directly attached to the look of a web or facebook …..??

Well … now I want to share how to create a chat like that of facebook using a PHP framework.

let’s get started…

  • Here I create a database first facebookchat” (without the quotes), to accommodate all the data, either user should login or chat the user.
  • Then create 3 tables namely chat, ci_sessions, users.
    • table of chat, ci_sessions, users
  • Now, we begin to get into programming. The first thing to do is to first define the database used in the system> application> config > database.php. adjust the username, password and database name that is used

$db[‘default’][‘hostname’] = “localhost”;            –> default

$db[‘default’][‘username’] = “root”;                       –>  default

$db[‘default’][‘password’] = “kebersamaan”;      –> your sql password

$db[‘default’][‘database’] =
“facebookchat”;      –>  your db name

$db[‘default’][‘dbdriver’] = “mysql”;

$db[‘default’][‘dbprefix’] = “”;

$db[‘default’][‘pconnect’] =
TRUE;

$db[‘default’][‘db_debug’] =
TRUE;

$db[‘default’][‘cache_on’] =
FALSE;

$db[‘default’][‘cachedir’] =
“”;

$db[‘default’][‘char_set’] =
“utf8”;

$db[‘default’][‘dbcollat’] =
“utf8_general_ci”;

  • Then create the sql command in the model folder, create a web control in the controller folder, and create a web interface / interface in folder viewsThe entire file can be downloaded at this link  http://adf.ly/56MS2   . the file has been uploaded there is also the sql of this project.
  • ok that’s all I can possibly share, feel free enjoy it ^^
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s