+ All Categories
Home > Documents > online chat application document.docx

online chat application document.docx

Date post: 02-Mar-2018
Category:
Upload: vijay-kumar
View: 560 times
Download: 16 times
Share this document with a friend

of 48

Transcript
  • 7/26/2019 online chat application document.docx

    1/48

    CHAPTER 1

    INTRODUCTION

    ABSTRACT

    Online chat application for educational institution like Chat application

    is an online system created for the number of members to connect with

    each other over the World Wide Web. This project resolves almost all the

    restrictions of the traditional program. Both the students and instructors

    and the company are similarly helped by the suggested project. This chat

    application helps you to save a lot of persistence for both. This

    new application is known as Facebook or myspace like chat for inner

    communicating factors. We can say thoroughly that this application is

    very useful for the various higher education students. t is mainly

    developed for the higher education students to decrease the interaction

    gap between the different individuals in a various college atmosphere.

    ABOUT THE PROJECT

  • 7/26/2019 online chat application document.docx

    2/48

    The prominence and fame of computers is brought about by

    its e!cellence to support variety of applications that make

    communication much easier. Communication often comes along with

    sharing information that plays an important role in today"s life where

    even minute information can bring large profits. n such an environment

    developers need to create a podium that enables data sharing among

    groups such as in organi#ations$ communities$ hospitals$ schools or

    universities etc. very painless. For any data sharing the most significant

    scheme is to provide no loss of data which is shored up by %&%. 'nyapplication using the %&% platform simplifies the application

    development in the highly distributed environment of the nternet.

    The system is designed to develop an interactive atmosphere that helps

    in group creation$ enables information share and also group destruction

    when the group is not in use. This system is used for developing genericapplications which are user(friendly and secure too.

    CHAPTER 2

  • 7/26/2019 online chat application document.docx

    3/48

    SYSTEM REQUIREMENT

    2.1 HARDWARE REQUIREMENTS:

    )ystem * %entium + ,.- . &ard /isk * -0 B.

    1onitor * 23 +' Colour.

    4am * 32, 1b.

    2.2 SOFTWARE REQUIREMENTS:

    O) * Windows 5%67

    8anguage * %&% Front 9nd * /reamweaver

    Back 9nd * 5ampp server with 1y):8

    Browser * 'ny Web Browser

    2.3 TECHNOLOGY USED

    2.3.1 DREAMWEAVER

    /reamweaver is one of the best W;)W; editors on the market.

    t is easy to use and creates great web pages. ' list of tips and tricks for

    using a very powerful web /evelopment program. ;ou should also

    check out the BB9dit and &ome site tips as well$ as it"s packaged with

    them. t is bettan then the previous version ./reamweaver C)< in a

    head(to(head comparison.

  • 7/26/2019 online chat application document.docx

    4/48

    Ado! D"!#$%!#&!":

    t is a te!t editor and W;)W; editor for windows 1acintosh. t

    is best suited to professional web /esigners or professional Web

    /evelopers.

    2.' DATABASE

    /atabase used for my project is 1;):8. 1;):8 is the world"s

    most widely used open source relational database management system

    that runs as a server providing multi(user access to a number of

    databases. 1;):8 was owned and sponsored company 1;):8 'B$

    now owned by Oracle Corporation. 1;):8 is a popular choice of

    database for use in web applications$ and is a central component of the

    widely used 8'1% open source web application software stack.

  • 7/26/2019 online chat application document.docx

    5/48

    CHAPTER 3

    ABOUT THE SOFTWARE

    3.1 INTRODUCTION TO PHP

    PHPis a server(side scripting language designed for web

    development but also used as a general(purpose programming language.'s of =anuary ,02>$ %&% was installed on more than ,-0

    million websites ?>@A of those sampled and ,.2 million web servers.

    Originally created by 4asmus8erdorf in 2@@-$ the reference

    implementation of %&% ?powered by the end 9ngine is now produced

    by The %&% roup. While %&% originally stood for %ersonal &ome

    %age$ it now stands for %&%* &yperte!t %reprocessor$ which is

    a recursive acronym.

    %&% code can be simply mi!ed with &T18 code$ or it can be used in

    combination with various templating engines and web frameworks. %&%

    code is usually processed by a %&% interpreter$ which is usually

    implemented as a web serverDs native module or a Common ateway

    nterface ?C e!ecutable. 'fter the %&% code is interpreted and

    e!ecuted$ the web server sends resulting output to its client$ usually in

    form of a part of the generated web page E for e!ample$ %&% code can

  • 7/26/2019 online chat application document.docx

    6/48

    generate a web pageDs &T18 code$ an image$ or some other data. %&%

    has also evolved to include a command(line interface ?C8 capability

    and can be used in standalone graphical applications.

    SYNTA(

    The following &ello world programis written in %&% code embedded in

    an &T18document*

    G/OCT;%9 htmlH

    htmlHheadH

    titleH%&% Test6titleH

    6headH

    bodyH

    )*+,+echoDpH&ello World6pHDI*-

    6bodyH

    6htmlH

    &owever$ as %&% does not need to be embedded in &T18 or used with

    a web server$ the simplest version of a &ello World program can be

    written like this$ with the closing tag omitted as preferred in files

    containing pure %&% code ?prior to %&% 3.-.0$ this short synta!

    for echo? only works with the shortJopenJtag configuration setting

    enabled$ while for %&% 3.-.0.

    )*D&ello worldDI

    http://en.wikipedia.org/wiki/Hello_world_programhttp://en.wikipedia.org/wiki/HTMLhttp://en.wikipedia.org/wiki/Hello_world_programhttp://en.wikipedia.org/wiki/HTML
  • 7/26/2019 online chat application document.docx

    7/48

    The %&% interpreter only e!ecutes %&% code within its delimiters.

    'nything outside its delimiters is not processed by %&% ?although non(

    %&% te!t is still subject to control structuresdescribed in %&% code. The

    most common delimiters are to close %&%

    sections. and delimiters

    are also available$ as are the shortened forms as well as ')%(style short

    forms

  • 7/26/2019 online chat application document.docx

    8/48

    for command(linescripting and client(sidegraphical user

    interface? applications. %&% can be deployed on most web servers$

    many operating systemsandplatforms$ and can be used with

    many relational database management systems?4/B1). 1ost web

    hostingproviders support %&% for use by their clients. t is available free

    of charge$ and the %&% roup provides the complete source code for

    users to build$ customi#e and e!tend for their own use.

    %&% acts primarily as a filter$ taking input from a file or stream

    containing te!t and6or %&% instructions and outputting another stream of

    data. 1ost commonly the output will be &T18$ although it could

    be =)OP$ 518orbinary data such as image or audio formats. )ince

    %&% -$ the %&%parsercompilesinput to producebytecodefor

    processing by the end 9ngine$ giving improved performance over

    its interpreterpredecessor.

    Originally designed to create dynamic web pages$ %&% now focuses

    mainly on server(side scripting$ and it is similar to other server(side

    scripting languages that provide dynamic content from a web server to

    a client$ such as 1icrosoftDs ')%.P9T$ )un 1icrosystemsD =ava)erver

    %ages$ and modJperl.

    T,! $#/0 #d#! o4 PHP+"o"#$$/0 /0567d! ,!

    4o66o%/0:

    O+!0 So7"5!

    http://en.wikipedia.org/wiki/Command-linehttp://en.wikipedia.org/wiki/Client-sidehttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Computing_platformhttp://en.wikipedia.org/wiki/Relational_database_management_systemhttp://en.wikipedia.org/wiki/Web_hostinghttp://en.wikipedia.org/wiki/Web_hostinghttp://en.wikipedia.org/wiki/Filter_(software)http://en.wikipedia.org/wiki/JSONhttp://en.wikipedia.org/wiki/XMLhttp://en.wikipedia.org/wiki/Binary_datahttp://en.wikipedia.org/wiki/Parserhttp://en.wikipedia.org/wiki/Compilerhttp://en.wikipedia.org/wiki/Bytecodehttp://en.wikipedia.org/wiki/Zend_Enginehttp://en.wikipedia.org/wiki/Interpreter_(computing)http://en.wikipedia.org/wiki/Web_pagehttp://en.wikipedia.org/wiki/Server-side_scriptinghttp://en.wikipedia.org/wiki/Client_(computing)http://en.wikipedia.org/wiki/Microsofthttp://en.wikipedia.org/wiki/ASP.NEThttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/JavaServer_Pageshttp://en.wikipedia.org/wiki/JavaServer_Pageshttp://en.wikipedia.org/wiki/Mod_perlhttps://en.wikipedia.org/wiki/PHPhttp://en.wikipedia.org/wiki/Command-linehttp://en.wikipedia.org/wiki/Client-sidehttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Computing_platformhttp://en.wikipedia.org/wiki/Relational_database_management_systemhttp://en.wikipedia.org/wiki/Web_hostinghttp://en.wikipedia.org/wiki/Web_hostinghttp://en.wikipedia.org/wiki/Filter_(software)http://en.wikipedia.org/wiki/JSONhttp://en.wikipedia.org/wiki/XMLhttp://en.wikipedia.org/wiki/Binary_datahttp://en.wikipedia.org/wiki/Parserhttp://en.wikipedia.org/wiki/Compilerhttp://en.wikipedia.org/wiki/Bytecodehttp://en.wikipedia.org/wiki/Zend_Enginehttp://en.wikipedia.org/wiki/Interpreter_(computing)http://en.wikipedia.org/wiki/Web_pagehttp://en.wikipedia.org/wiki/Server-side_scriptinghttp://en.wikipedia.org/wiki/Client_(computing)http://en.wikipedia.org/wiki/Microsofthttp://en.wikipedia.org/wiki/ASP.NEThttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/JavaServer_Pageshttp://en.wikipedia.org/wiki/JavaServer_Pageshttp://en.wikipedia.org/wiki/Mod_perlhttps://en.wikipedia.org/wiki/PHP
  • 7/26/2019 online chat application document.docx

    9/48

    %&% is freely available for use. The community of open source %&%

    developers provides technical support and is constantly improving

    updating the core %&% functionalities. %&% is available at free of cost

    under %&% eneral %ublic 8icense and most of its associative reLuired

    softwareDs like 1y):8$ Te!t 9ditors and 'pache )erver are also freely

    available$ so it proves very cost effective for the developers.

    C"o8P6#4o"$

    %&% provides high compatibility with leading operating systems and

    web servers such as thereby enabling it to be easily deployed across

    several different platforms. %&% scripts can run across operating systems

    such as 8inu!$ Windows$ )olaris$ OpenB)/$ 1ac O)5 etc and also

    provide support for all major web servers such as 'pache$ )$ i%lanet

    etc.

    Po%!"

    )everal web tasks can now be easily perform using %&%. For e!ample

    now we can develop from small websites to giant business and

    organi#ational websites$ informative forums$ chatting platforms$ C41

    solutions$ e(commerce shopping carts$ community websites$ e(business$

    shopping carts and gigantic database driven sites.

  • 7/26/2019 online chat application document.docx

    10/48

    U!" F"/!0d69

    /esigned in a user friendly manner$ %&% gives more fle!ibility than C$

    CQQ and ')% and overall helps in increasing traffic to the site.

    Q7/5

    %&% is designed to work well with the web$ and so things like accessing

    the 9T and %O)T and working with &T18 and 48s are built(ins in

    the %&% language. This makes it really concise and straightforward to

    make a website.

    E;!0/o0

    Being an open source language$ a large number of libraries and

    e!tensions$ to e!tend its core functionalities$ are available for download.

    The source code of %&% can be modified to include custom created

    e!tensions and components thereby increasing its e!tensibility.

    E#9 D!+6o9$!0

    There are many hosting companies that will$ for a few dollars a month$

    give you a server running %&% so you can make a website really easily.

  • 7/26/2019 online chat application document.docx

    11/48

  • 7/26/2019 online chat application document.docx

    12/48

  • 7/26/2019 online chat application document.docx

    13/48

    comes with a number of other modules

    including Open))8 and php1y'dmin.

    )elf(contained$ multiple instances of 5'1%% can e!ist on a single

    computer$ and any given instance can be copied from one computer to

    another.

    USE

    Officially$ 5'1%%Ds designers intended it for use only as a development

    tool$ to allow website designers and programmers to test their work on

    their own computers without any access to the nternet. To make this as

    easy as possible$ many important security features are disabled by

    default. n practice$ however$ 5'1%% is sometimes used to actually

    serve web pages on the World Wide Web.

    ' special tool is provided topassword(protectthe most important parts

    of the package. 5'1%% also provides support for creating and

    manipulating databases in 1y):8and ):8iteamong others.

    Co$+o0!0

    5'1%% 2.R.>(3 for Windows$ including*

    'pache ,.-.20

    1y):8 3.

  • 7/26/2019 online chat application document.docx

    14/48

    %&% 3.3.23

    php1y'dmin -.,.7.2

    Fileilla FT% )erver [email protected]

    Tomcat7.0.-, ?with modJpro!yJajp as connector

    )trawberry %erl 3.2.2 %ortable

    5'1%% Control %anel >.,.2 ?from hackattack2-,

    5'1%% 2.R.>(3 for 8inu!$ including*

    'pache ,.-.20

    1y):8 3.

  • 7/26/2019 online chat application document.docx

    15/48

    1y):8 is ideal for both small and large applications

    1y):8 is very fast$ reliable$ and easy to use

    1y):8 supports standard ):8

    1y):8 compiles on a number of platforms

    1y):8 is free to download and use

    1y):8 is developed$ distributed$ and supported by Oracle

    Corporation

    1y):8 is named after co(founder 1onty WideniusDs daughter* 1y

    The data in 1y):8 is stored in tables. ' table is a collection of related

    data$ and it consists of columns and rows.

    PHP = M9SQL

    %&% combined with 1y):8 are cross(platform ?you can developin Windows and serve on a ni! platform

    Q7!"/!

    ' Luery is a Luestion or a reLuest. We can Luery a database for specificinformation and have a record set returned.

    8ook at the following Luery ?using standard ):8*

    )989CT 8astPame F4O1 9mployees

  • 7/26/2019 online chat application document.docx

    16/48

    The Luery above selects all the data in the K8astPameK column from theK9mployeesK table.

    E(ISTING SYSTEM:

    n our e!isting system$ %eople communicated with one another using

    post$ email$ phone$ facebook$ etc. But based on time consuming the new

    device and software are introduced to communicate with each other.

    Through post people can communicate with each other using letter. n

    telephone user can speak each other. 9(mail provides many cost

    advantages when compared with the use of paper or the telephone.

    DISADVANTAGES:

    &eavy work .

    8ow 1aintenance.

    &igh Cost

    PROPOSED SYSTEM

    C&'T 'pplication is an online system developed for the group of

    members to communicate with each other over the internet. This system

    solves almost all the limitations of the conventional system.Both the

  • 7/26/2019 online chat application document.docx

    17/48

    students and teachers and the company are eLually benefited by the

    proposed system.We are introducing a new software called C&'T

    )94+94 for chatting purpose. We can say thoroughly that this software

    is very useful for the college. t is mainly designed for the college to

    reduce the communication gap between the different peoples in a

    college.

    ADVANTAGES

    &igh )ecurity

    4educe 1anual Work

    Organi#ed Work

    SYSTEM STUDY

    FEASIBLITY STUDY:

    The feasibility of the project is analy#ed in this phase and business

    proposal is put forth with a very general plan for the project and some

    cost estimates. /uring system analysis the feasibility study of theproposed system is to be carried out. This is to ensure that the proposed

    system is not a burden to the company. For feasibility analysis$ some

    understanding of the major reLuirements for the system is essential.

    Three key considerations involved in the feasibility analysis are

  • 7/26/2019 online chat application document.docx

    18/48

    9COPO1C'8 F9')B8T;

    T9C&PC'8 F9')B8T;

    )OC'8 F9')B8T;

    ECONOMICAL FEASIBILITY

    This study is carried out to check the economic impact that the

    system will have on the organi#ation. The amount of fund that the

    company can pour into the research and development of the system islimited. The e!penditures must be justified. Thus the developed system

    as well within the budget and this was achieved because most of the

    technologies used are freely available. Only the customi#ed products had

    to be purchased.

    TECHNICAL FEASIBILITY

    This study is carried out to check the technical feasibility$ thatis$ the technical reLuirements of the system. 'ny system developed must

    not have a high demand on the available technical resources. This will

    lead to high demands on the available technical resources. This will lead

    to high demands being placed on the client. The developed system must

    have a modest reLuirement$ as only minimal or null changes are reLuired

    for implementing this system.

    SOCIAL FEASIBILITY

    The aspect of study is to check the level of acceptance of the

    system by the user. This includes the process of training the user to use

    the system efficiently. The user must not feel threatened by the system$

  • 7/26/2019 online chat application document.docx

    19/48

    instead must accept it as a necessity. The level of acceptance by the users

    solely depends on the methods that are employed to educate the user

    about the system and to make him familiar with it. &is level of

    confidence must be raised so that he is also able to make someconstructive criticism$ which is welcomed$ as he is the final user of the

    system.

    IMPLEMENTATION:

    MODULES:

    For this application the modules are divided between student andstaff on the basis of permissions that are given to them for

    manipulating the member.

    This includes three modules

    )tudent

    )taff

    'dministrator

    Broadcast

    1ulticast

    STUDENT:

  • 7/26/2019 online chat application document.docx

    20/48

    4egisters into the login.)earches and joins in the e!isting groups.)hares

    messages$ 8inks and Files with other members of that particular

    member.

    ADMIN:

    +erifies the student login information and grants permission)ends user"s

    password to user"s emailverifies student name$ description and creates a

    new group$ similarly searches for the member.rants the permission to

    the owner of group to change group details or delete group.

    STAFF:

    4egisters into the login.)earches and joins in the e!isting

    member.)hares messages$ 8inks and Files with other members of that

    particular member.

    BROADCAST:

    Broadcasting refers to a method of transferring a message to all

    recipients simultaneously. Broadcasting can be performed as a high level

    operation in a program$ for e!ample broadcasting 1essage passinginterface.

  • 7/26/2019 online chat application document.docx

    21/48

    MULTICAST:

    n multicast ?one(to(many or many(to(many distribution

    is group communication where information is addressed to a group of

    destination computers simultaneously.

    1ulticast should not be confused with physical

    layer point(to(multipoint communication.

    DATA FLOW DIAGRAM

    MemberSearch

    user

    Login

    Process

    User

    Member

    Registration

    f not a

    member

    f member

  • 7/26/2019 online chat application document.docx

    22/48

  • 7/26/2019 online chat application document.docx

    23/48

    )oftware testing is an investigation conducted to provide

    stakeholders with information about the Luality of the product or service

    under test.M2N)oftware testing can also provide an objective$ independent

    view of the softwareto allow the business to appreciate and understand

    the risks of software implementation. Test techniLues include$ but are

    not limited to$ the process of e!ecuting a program or application with the

    intent of finding software bugs?errors or other defects.

    t involves the e!ecution of a software component or system to evaluate

    one or more properties of interest. n general$ these properties indicate

    the e!tent to which the component or system under test*

    meets the reLuirements that guided its design and development$

    responds correctly to all kinds of inputs$

    performs its functions within an acceptable time$

    is sufficiently usable$

    can be installed and run in its intended environments$ and

    achieves the general result its stakeholders desire.

    's the number of possible tests for even simple software components is

    practically infinite$ all software testing uses some strategy to select tests

    that are feasible for the available time and resources. 's a result$

    http://en.wikipedia.org/wiki/Software_testing#cite_note-1http://en.wikipedia.org/wiki/Softwarehttp://en.wikipedia.org/wiki/Software_bughttp://en.wikipedia.org/wiki/Operating_environmenthttp://en.wikipedia.org/wiki/Software_testing#cite_note-1http://en.wikipedia.org/wiki/Softwarehttp://en.wikipedia.org/wiki/Software_bughttp://en.wikipedia.org/wiki/Operating_environment
  • 7/26/2019 online chat application document.docx

    24/48

  • 7/26/2019 online chat application document.docx

    25/48

  • 7/26/2019 online chat application document.docx

    26/48

  • 7/26/2019 online chat application document.docx

    27/48

    /ue to the fact that a skilled tester is needed to perform white bo!

    testing$ the costs are increased.

    )ometimes it is impossible to look into every nook and corner to

    find out hidden errors that may create problems as many paths will gountested.

    t is difficult to maintain white bo! testing as the use of speciali#ed

    tools like code analy#ers and debugging tools are reLuired.

    TESTING STRATEGIES

    The purpose of testing is to discover errors. Testing is the process

    of trying to discover every conceivable fault or weakness in a work

    product. t provides a way to check the functionality of components$ sub

    assemblies$ assemblies and6or a finished product t is the process of

    e!ercising software with the intent of ensuring that the )oftware system

    meets its reLuirements and user e!pectations and does not fail in an

    unacceptable manner. There are various types of test. 9ach test type

    addresses a specific testing reLuirement.

    U0/ T!/0

    nit testing involves the design of test cases that validate that the

    internal program logic is functioning properly$ and that program inputs

    produce valid outputs. 'll decision branches and internal code flow

    should be validated. t is the testing of individual software units of the

    application .it is done after the completion of an individual unit before

  • 7/26/2019 online chat application document.docx

    28/48

  • 7/26/2019 online chat application document.docx

    29/48

    +alid nput * identified classes of valid input must be accepted.

    nvalid nput * identified classes of invalid input must be rejected.

    Functions * identified functions must be e!ercised.

    Output * identified classes of application outputs must be

    e!ercised.

    )ystems6 %rocedures * interfacing systems or procedures must be

    invoked.

    Organi#ation and preparation of functional tests is focused on

    reLuirements$ key functions$ or special test cases. n addition$ systematic

    coverage pertaining to identify Business process flowsI data fields$

    predefined processes$ and successive processes must be considered for

    testing. Before functional testing is complete$ additional tests are

    identified and the effective value of current tests is determined.

    THE ART OF DEBUGGING

    The development of good code usually follows the design

    methodology we have discussed in class* first you understand the

    customer"s needs and captures these in the reLuirements of the systemI

    then the system design starts. The design spec. and implementation spec

    follow capturing the data flow$ O$ important data structure and

    algorithm design and finally the pseudo code for the system. 'fter all

  • 7/26/2019 online chat application document.docx

    30/48

    that* which typically think of as the thinking about the problem and

    using abstraction ?data structure design$ comes the coding phase. Once

    you have written code you need to test it. ;es$ know this is boringG But

    unit testing$ sub(system testing$ system testing and finally integration

    testing are a really important part of the life cycle of good software

    development.

    There is a tension to consider when testing ( you want a set of tools

    that help you Luickly find the bugs$ but you don"t want to feel this is

    some sort of worthless ta! strategy imposed by the company you work

    for to get code out of the door to the customer. )o once you have coded

    your functions$ units$ modules$ sub(system you need to test it and find

    the bugs ( they will e!istG Once you have a tested system and your

    system fails ( maybe a bug not uncovered during testing ( then you need

    to debug. n fact solving problems found while testing also reLuires a setof debugging tools and strategies.

    Types of Errors

    The major groups of errors found in system development are

    reLuirement spec$ design spec and coding errors. n what follows$ we

    discuss these common types of errors found in systems.

  • 7/26/2019 online chat application document.docx

    31/48

  • 7/26/2019 online chat application document.docx

    32/48

    software engineers in the design phase can be helped with writing good

    clear specs that people read and discuss in detail in design reviews

    before a line of code is written.

    Cod/0 E""o"

    The main error people associate with software is coding errors. We

    all make coding errors. &aving a solid /esign )pec to work from that

    has gone through a rigorous review helps. Translating that spec to an

    mplementation )pec that we have discussed in this course is the ne!t

    step. Once code is written and unit tested ?we will discuss this in the

    ne!t lecture then Sdesk checking your code is your best friend ( more

    on coding inspection below.

    1ake believe that you are the computer e!ecuting the code line by

    line ( update the data structures just like your code. )tudy the O in your

    code as you e!ecute it. ;ou will find many errors this way. 9ven better

    ask another person working in the project but not familiar with your

    code to desk check your code. )ometimes errors can be staring you in

    the face and a fresh set of eyes can pick those pesky bugs out. The take

    home is that you do not need a computer to find bugs.

    General Debugging Techniques

    When tracking down pesky bugs we can think of the following steps to

    finding them*

  • 7/26/2019 online chat application document.docx

    33/48

    Testing* Finding out what bugs e!ist. We have already designed

    some simple test scripts for the crawler.

    )tabili#ation* Try and make the bugs reproducible ?what condition

    causes a particular bug and is it repeatable.

    8ocali#ation* dentify the function$ line of the code responsible.

    Correction* Fi! the code.

    +erification* Test the code fi! and confirm it works.

    TEST CASES

  • 7/26/2019 online chat application document.docx

    34/48

  • 7/26/2019 online chat application document.docx

    35/48

  • 7/26/2019 online chat application document.docx

    36/48

  • 7/26/2019 online chat application document.docx

    37/48

    USER REGISTRATION

    Vphp

    errorJreporting ?0I

    obJstart?I

    sessionJstart?I

    reLuireJonce Dconfig6config.phpDI

    if?isset?J%O)TMDsubmitDN

    X

    fullnameYJ%O)TMDfullnameDNI

    genderYJ%O)TMDgenderDNI

    usernameYJ%O)TMDusernameDNI

    passwordYJ%O)TMDpassswordDNI

    insertJLueryYKinsert into ictJuser?name$gender$userJname$password

    values?DfullnameD$DgenderD$DusernameD$DpasswordDIKI

    result Y ZmysLlJLuery?insertJLueryI

    66Check whether the Luery was successful or not

    if?result X

    VH

    script languageYDjavascriptDH

    alert?D4egistration successDI

    window.location.href Y Klogin.phpKI

  • 7/26/2019 online chat application document.docx

    38/48

    6scriptH

    Vphp

    [else

    X

    echo K:uery failedKI

    [

    [

    VH

    ADMIN LOGIN PAGE

    Vphp

    unYJ%O)TMDanameDNI

    pwYJ%O)TMDpassDNI

    if ?J%O)TMKanameKN YY KadminK UU J%O)TMKpassKN YY KadminK X

    sessionJstart?I

    J)9))OPMK8oginKN Y K;9)KI

    header?D8ocation*adminhome.phpDI

    [

    else

    X

  • 7/26/2019 online chat application document.docx

    39/48

    echo KWrong sername and %asswordKI

    echo KpHa hrefYDinde!.htmlDHback to login pageGGG6aHp6HKI

    [VH

    DATABASE CONNECTION

    Vphp

    66ive your mysLl username password and database name

    conYmysLliJconnect?KlocalhostK$KrootK$KK$KchatKI

    if ?mysLliJconnectJerrno?

    X

    echo KFailed to connect to 1y):8* K . mysLliJconnectJerror?I

    [

    VH

    MEMBER LOGIN

    Vphp

    conYmysLliJconnect?KlocalhostK$KrootK$KK$KshareKI

    66 Check connection

    if ?mysLliJconnectJerrno? X

    echo KFailed to connect to 1y):8* K . mysLliJconnectJerror?I

    [

    unYJ%O)TMDusernameDNI

  • 7/26/2019 online chat application document.docx

    40/48

    pwYJ%O)TMDpassDNI

    result Y mysLliJLuery?con$K)989CT \ F4O1 ]memreg] W&949

    unameYDunD 'P/ passYDpwDKI

    if?mysLliJnumJrows?result YY 2

    X

    sessionJstart?I

    J)9))OPMDunameDNYunI

    header?D8ocation*memberhome.phpDI

    [

    else

    X

    echo Dwrong username or passwordDI

    echo Da hrefYKregister.phpKHgo back6aHDI

    [

    VH

    VIEW MEMBER GROUP:

    VphpconYmysLliJconnect?KlocalhostK$KrootK$KK$KshareKI

    if ?mysLliJconnectJerrno? X

    echo KFailed to connect to 1y):8* K . mysLliJconnectJerror?I

  • 7/26/2019 online chat application document.docx

    41/48

    [

    result Y mysLliJLuery?con$K)989CT \ F4O1 memregKI

    echo Ktable borderYD2D bgcolorYD^0/C793D widthYD200ADHtrH

    thH191B94 P'196thH

    thHF88 P'196thH

    thH91'86thH

    thH/'T9 OF B4T&6thH

    thH/'T9 OF =OP6thH

    6trHKI

    while?row Y mysLliJfetchJarray?result X

    echo KtrHKI

    echo KtdHK . rowMDunameDN . K6tdHKI

    echo KtdHK . rowMDfnameDN . K6tdHKI

    echo KtdHK . rowMDemailDN . K6tdHKI

    echo KtdHK . rowMDdobDN . K6tdHKI

    echo KtdHK . rowMDdojDN . K6tdHKI

    echo K6trHKI

    [

    echo K6tableHKI

    mysLliJclose?conI

  • 7/26/2019 online chat application document.docx

    42/48

    VH

    GROUP DETAILS

    Vphp

    con Y mysLliJconnect?KlocalhostK$KrootK$KK$KshareKI

    if?mysLliJconnectJerrno?

    X

    echo Kfailed to connectK . mysLliJerror?I

    [

    memname Y mysLliJrealJescapeJstring?con$ J%O)TMDmemnameDNI

    groupname Y mysLliJrealJescapeJstring?con$ J%O)TMDgroupnameDNI

    groupid Y mysLliJrealJescapeJstring?con$ J%O)TMDgroupidDNI

    doc Y mysLliJrealJescapeJstring?con$ J%O)TMDdocDNI

    groupdes Y mysLliJrealJescapeJstring?con$ J%O)TMDgroupdesDNI

    sLl Y KP)94T PTO reg ?memname$ groupname$ groupid$

    doc$groupdes +'89)?DmemnameD$ DgroupnameD$ DgroupidD$ DdocD$

    DgroupdesDKI

    if?GmysLliJLuery?con$sLlX

    die?D9rrror*D . mysLliJerror?conI[else echo Ksuccessfully Create groupKI

    echo Da hrefYKmemberhome.phpKHo back6aHDI

  • 7/26/2019 online chat application document.docx

    43/48

  • 7/26/2019 online chat application document.docx

    44/48

    if?isset?J%O)TMDsJsayDN UU J%O)TMDsJmessageDN X

    ssername Y JCOO_9MDmemberJnameDNI

    66the host$ name$ and password for your mysLl v8ink Y mysLlJconnect?KlocalhostK$ this(Hs/bser$ this(

    Hs/b%assI

    66select the database

    mysLlJselectJdb?this(Hs/bPameI

    s1essage Y mysLlJrealJescapeJstring?J%O)TMDsJmessageDNI

    if ?s1essage GY DD X

    mysLlJLuery?KP)94T PTO ]sJchatJmessages] )9T

    ]user]YDXssername[D$ ]message]YDXs1essage[D$

    ]when]YP5JT19)T'1%?KI

    [

    mysLlJclose?v8inkI

    [

    [

    obJstart?I

    reLuireJonce?DchatJinput.htmlDI

    s)houtbo!Form Y obJgetJclean?I

    return s)houtbo!FormI

    [

    function get1essages? X

  • 7/26/2019 online chat application document.docx

    45/48

    v8ink Y mysLlJconnect?KlocalhostK$ this(Hs/bser$ this(

    Hs/b%assI

    66select the database

    mysLlJselectJdb?this(Hs/bPameI

    66returning the last 23 messages

    v4es Y mysLlJLuery?K)989CT \ F4O1 ]sJchatJmessages]

    O4/94 B; ]id] ')C 81T 23KI

    s1essages Y DDI

    66 collecting list of messages

    if ?v4es X

    while?a1essages Y mysLlJfetchJarray?v4es X

    sWhen Y date?K&*i*sK$ a1essagesMDwhenDNI

    s1essages .Y Ddiv classYKmessageKHD . a1essagesMDuserDN .

    D* D . a1essagesMDmessageDN . DspanH?D . sWhen . D6spanH6divHDI

    [

    [ else X

    s1essages Y D/B error$ create ):8 table beforeDI

    [

    mysLlJclose?v8inkI

    obJstart?I

    reLuireJonce?DchatJbegin.htmlDI

    echo s1essagesI

  • 7/26/2019 online chat application document.docx

    46/48

  • 7/26/2019 online chat application document.docx

    47/48

    REFERENCES

    1. %&% 36K1y):8K %rogramming for the 'bsolute Beginner byAndy

    Harris

    2. %&%* ' B9PP94D) /9 by Vikram Vaswani

    3. PHP #0d M9SQL W! D!&!6o+$!0 ', Ed//o0byLuke

    Welling and Laura Thomson

    '. L!#"0/0 PHP M9SQL J#S5"/+ #0d CSS Boo>byRobin

    Nixon

    5. H!#d F/" PHP @ M9SQL Boo 4o" B!/00!"byLynn beighley

    and Mihael Morrison

  • 7/26/2019 online chat application document.docx

    48/48


Recommended