|
|
Below is the default form of the constructor:
| Constructor & Example Usage |
Description |
PHPSimpleChat( string $user = '', string $room = ''
)
- $mychat = new PHPSimpleChat();
- $mychat = new PHPSimpleChat('bob');
- $mychat = new PHPSimpleChat($user, $room);
- $mychat = new PHPSimpleChat(NULL, 'social_chat_2');
|
PHPSimpleChat constructor. Both user and room arguments
are optional. If no user is specified, a random username
will be generated. If no room is specified, the chat instance
will use the main default room. |
The two other main, required functions are below:
| Main Functions & Usage |
Description |
displayHeader( )
- $mychat->displayHeader();
|
This function outputs the required Javascript and CSS
for PHPSimpleChat. This must be called in the header of
your web page, between the <head> and </head>
tags. For more information see the tutorial.
|
displayChat( )
|
This function outputs the PHPSimpleChat chat
window. This should be called in the body of your web page,
between the <body> and </body> tags. For more
information see the tutorial. |
|
|