PHP Chat Room Implementation with Session Access Management - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

PHP Chat Room Implementation with Session Access Management

Description:

At the log in screen, chat room users choose a user name and enter his/her ... Although, chat rooms seem to have few advantages over news groups, listservs, or ... – PowerPoint PPT presentation

Number of Views:1497
Avg rating:3.0/5.0
Slides: 21
Provided by: josephap
Category:

less

Transcript and Presenter's Notes

Title: PHP Chat Room Implementation with Session Access Management


1
PHP Chat Room Implementation with Session Access
Management
  • Jonathan Xavier Ozovek
  • Renée Puchalski

2
Presentation Outline
  • Introduction
  • Explanation What is a Chat Room?
  • Original Chat Script
  • How does this Chat Room Work?
  • New Features
  • The Result
  • Conclusion

3
Introduction
  • The use of the computer lead to multiple
    discoveries of new ways for people to have
    discussions with one another including news
    groups, forums, mailing lists, chat clients, and
    video conferencing.
  • Of these discoveries , there is only one that
    provides a simple way for two or more people to
    communicate in real time without the use of
    external devices attached to your computer
  • the chat room.

4
What is a Chat Room?
  • A chat room is a web site, part of a web site, or
    part of an online service such as America Online,
    that provides a venue for communities of users
    with a common interest to communicate in real
    time.

5
What is a Chat Room? (contd)
  • At the log in screen, chat room users choose a
    user name and enter his/her password.
  • Chat users are alerted when another person enters
    the chat room.
  • To chat, users type a message into a text box.
    The message is almost immediately visible in the
    larger communal message area and other users
    respond.
  • Text formatting, pretty color schemes, and
    different icons are chosen by clicking on the
    corresponding buttons below the text box.

6
Original Chat Script
  • Original chat room had no session management,
    user authentication, or associated screen names.
  • There was an input box and the user would simply
    type in who they wanted to appear as in the chat.

7
How does this Chat Script Work?
  • Text that is entered into the text box is saved
    to a log file on the UNIX server.
  • Every 3-7 seconds, the saved text from the log
    file is retrieved and printed to the screen in
    the shared message area.
  • Chat room is comprised of many PHP components.

8
(No Transcript)
9
Main.php file
Insert.php file
10
How does this Chat Script Work? (contd)
  • Three main components
  • Set.php file
  • Main.php file
  • Insert.php file

11
New Features
  • PHP Session Management
  • Associated Screen Names with Valid Users

12
Project Modification Diagram
Start
13
PHP Session Management
  • Added session management variables to
    authentication and index pages.
  • One variable for the session ID and another for
    the logon name a user selected.
  • When converting our .php files to .cgi,
    modifications were required to get the session
    management to work properly. This involved
    adding a session_save_path() statement prior to
    declaring _at_session_start()

14
Additions/Modifications to complete project
  • Created a password encryption script
  • Created a password validation script
  • Created a screen name select box creation script
  • For these, two text files were required.
  • Password text file
  • Screen Name text file

15
Encryption Script
  • Encrypts a users password and write that and his
    or her name to a saved password file.
  • File has protections of chmod 700 on my account
    when not in use, so there can be no added
    user/password combinations without my
    authorization.

16
Log On Script
  • Takes a users name and password as input,
    encrypt their password input and test it against
    the password file to see if it is a valid user.
  • After integration, changed this file to a .cgi
    extension so the password text file could only be
    accessible to the owner.

17
Screen Name Script
  • Loads the associated screen names with a valid
    users login name. This will also be
    accomplished through storage in a text file, and
    the script will load a drop down menu containing
    the screen names.
  • After integration, changed this file to a .cgi
    extension as well. This is so the associated
    screen name text file could only be accessible to
    the owner.

18
The Result
  • Enter Chat Room
  • Password Encryption Script
  • Password Validation Script
  • Screen Name Select Box Creation Script
  • Example password text file
  • Example screen name text file

19
Conclusion
  • Although, chat rooms seem to have few advantages
    over news groups, listservs, or mailing lists,
    there is one exception. Discussions on
    complicated concepts, when conducted in
    asynchronous mode, can take many days, or even
    weeks, to complete. In a chat room, the same
    discussion may be completed in a much shorter
    time. This can be very important in teaching
    math, science, and technology over the internet
    today.

20
  • ANY QUESTIONS?
Write a Comment
User Comments (0)
About PowerShow.com