Online Chat Application Document
Online Chat Application Document
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. It is mainly
developed for the higher education students to decrease the interaction
gap between the different individuals in a various college atmosphere.
excellence
to
support
variety
of
applications
that
make
CHAPTER 2
SYSTEM REQUIREMENT
2.1 HARDWARE REQUIREMENTS:
System
: Pentium IV 2.4 GHz.
Hard Disk
: 40 GB.
Monitor : 15 VGA Colour.
Ram
: 512 Mb.
OS
Language
Front End
Back End
Browser
:
:
:
:
:
Windows XP/7
PHP
Dreamweaver
Xampp server with MySQL
Any Web Browser
Adobe Dreamweaver:
It is a text editor and WYSIWYG editor for windows Macintosh. It
is best suited to professional web Designers or professional Web
Developers.
2.4 DATABASE
Database used for my project is MYSQL. MYSQL is the worlds
most widely used open source relational database management system
that runs as a server providing multi-user access to a number of
databases. MYSQL was owned and sponsored company MYSQL AB,
now owned by Oracle Corporation. MYSQL is a popular choice of
database for use in web applications, and is a central component of the
widely used LAMP open source web application software stack.
CHAPTER 3
ABOUT THE SOFTWARE
created
by RasmusLerdorf in
1994,
the reference
generate a web page's HTML code, an image, or some other data. PHP
has also evolved to include a command-line interface (CLI) capability
and can be used in standalone graphical applications.
SYNTAX
The following Hello world program is written in PHP code embedded in
an HTML document:
<!DOCTYPE html>
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?phpecho'<p>Hello World</p>';?>
</body>
</html>
However, as PHP does not need to be embedded in HTML or used with
a web server, the simplest version of a Hello World program can be
written like this, with the closing tag omitted as preferred in files
containing pure PHP code (prior to PHP 5.4.0, this short syntax
for echo() only works with the short_open_tag configuration setting
enabled, while for PHP 5.4.0.
<?='Hello world';
The PHP interpreter only executes PHP code within its delimiters.
Anything outside its delimiters is not processed by PHP (although nonPHP text is still subject to control structuresdescribed in PHP code). The
most common delimiters are <?php to open and ?> to close PHP
sections. <script language="php"> and </script> delimiters
are also available, as are the shortened forms <? or <?= (which is used
to echo back a string or variable) and ?> as well as ASP-style short
forms <% or <%= and %>. Short delimiters make script files less
portable, since support for them can be disabled in the local PHP
configuration, and they are therefore discouraged. The purpose of all
these delimiters is to separate PHP code from non-PHP code, including
HTML.
The
first
form
of
in XHTML and
USE OF PHP
PHP is a general-purpose scripting language that is especially
suited to server-side web development, in which case PHP generally
runs on a web server. Any PHP code in a requested file is executed by
the PHP runtime, usually to create dynamic web page content or
dynamic images used on websites or elsewhere.[114] It can also be used
user
and
can
be
used
with
4,
the
to
produce bytecodefor
PHP is freely available for use. The community of open source PHP
developers provides technical support and is constantly improving
updating the core PHP functionalities. PHP is available at free of cost
under PHP General Public License and most of its associative required
software's like MySQL, Text Editors and Apache Server are also freely
available, so it proves very cost effective for the developers.
Cross-PlatformI
PHP provides high compatibility with leading operating systems and
web servers such as thereby enabling it to be easily deployed across
several different platforms. PHP scripts can run across operating systems
such as Linux, Windows, Solaris, OpenBSD, Mac OSX etc and also
provide support for all major web servers such as Apache, IS, iPlanet
etc.
Power
Several web tasks can now be easily perform using PHP. For example
now we can develop from small websites to giant business and
organizational websites, informative forums, chatting platforms, CRM
solutions, e-commerce shopping carts, community websites, e-business,
shopping carts and gigantic database driven sites.
User Friendly
Designed in a user friendly manner, PHP gives more flexibility than C,
C++ and ASP and overall helps in increasing traffic to the site.
Quick
PHP is designed to work well with the web, and so things like accessing
the GET and POST and working with HTML and URLs are built-ins in
the PHP language. This makes it really concise and straightforward to
make a website.
Extensions
Being an open source language, a large number of libraries and
extensions, to extend its core functionalities, are available for download.
The source code of PHP can be modified to include custom created
extensions and components thereby increasing its extensibility.
Easy Deployment
There are many hosting companies that will, for a few dollars a month,
give you a server running PHP so you can make a website really easily.
Automatically Refreshes
Nowadays developing dynamic websites are in the huge demand due to
its specific characteristics like it automatically refreshes and does not
need to make much changes manually.
Other Tools
If you need to access other web based tools like Google maps (which is
always advisable for a business website), or any other, PHP makes it
easy to access.
Security
PHP offers security as well that helps prevent malicious attacks. These
security levels can be adjusted in the .ini file.
Talent Availability
You can hire PHP programmers more easily than any other language
programmers since so many people know the language.
is
a free
and
open
scripts
written
in
MySQL
PHP
Perl
comes
with
number
of
other
modules
USE
Officially, XAMPP's 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 Internet. To make this as
easy as possible, many important security features are disabled by
default. In practice, however, XAMPP is sometimes used to actually
serve web pages on the World Wide Web.
A special tool is provided to password-protect the most important parts
of the package. XAMPP also provides support for creating and
manipulating databases in MySQL and SQLite among others.
Components
XAMPP 1.8.3-5 for Windows, including:
Apache 2.4.10
MySQL 5.6.20
PHP 5.5.15
phpMyAdmin 4.2.7.1
Apache 2.4.10
MySQL 5.6.20
PHP 5.5.15
phpMyAdmin 4.2.7.1
OpenSSL 1.0.1i
PHP + MySQL
PHP combined with MySQL are cross-platform (you can develop
in Windows and serve on a Unix platform)
Queries
A query is a question or a request. We can query a database for specific
information and have a record set returned.
Look at the following query (using standard SQL):
SELECT LastName FROM Employees
The query above selects all the data in the "LastName" column from the
"Employees" table.
EXISTING SYSTEM:
In our existing system, People 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. In
telephone user can speak each other. E-mail provides many cost
advantages when compared with the use of paper or the telephone.
DISADVANTAGES:
Heavy work .
Low Maintenance.
High Cost
PROPOSED SYSTEM
CHAT Application 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
students and teachers and the company are equally benefited by the
proposed system.We are introducing a new software called CHAT
SERVER for chatting purpose. We can say thoroughly that this software
is very useful for the college. It is mainly designed for the college to
reduce the communication gap between the different peoples in a
college.
ADVANTAGES
High Security
Reduce Manual Work
Organized Work
SYSTEM STUDY
FEASIBLITY STUDY:
The feasibility of the project is analyzed in this phase and business
proposal is put forth with a very general plan for the project and some
cost estimates. During system analysis the feasibility study of the
proposed 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 requirements for the system is essential.
Three key considerations involved in the feasibility analysis are
ECONOMICAL FEASIBILITY
TECHNICAL FEASIBILITY
SOCIAL FEASIBILITY
ECONOMICAL FEASIBILITY
This study is carried out to check the economic impact that the
system will have on the organization. The amount of fund that the
company can pour into the research and development of the system is
limited. The expenditures 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 customized products had
to be purchased.
TECHNICAL FEASIBILITY
This study is carried out to check the technical feasibility, that
is, the technical requirements of the system. Any 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 requirement, as only minimal or null changes are required
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,
IMPLEMENTATION:
MODULES:
For this application the modules are divided between student and
staff on the basis of permissions that are given to them for
manipulating the member.
This includes three modules
Student
Staff
Administrator
Broadcast
Multicast
STUDENT:
member.
ADMIN:
Verifies the student login information and grants permissionSends users
password to users emailverifies student name, description and creates a
new group, similarly searches for the member.Grants the permission to
the owner of group to change group details or delete group.
STAFF:
Registers
into
the
login.Searches
and
joins
in
the
existing
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 example broadcasting Message passing
interface.
MULTICAST:
In multicast (one-to-many or many-to-many distribution)
Member
Registration
computers
Multicast
should
not
be
layer
point-to-multipoint
If not a
member
simultaneously.
confused with physical
communication.
If member
Login
Search
Process
user
Member
Admin
Home page
Online
chat
List of user
SYSTEM TESTING
INTRODUCTION
is sufficiently usable,
TESTING PROCESS
All field entries must work properly,
Pages must be activated from the identified link.
The Entry screen, message and response must not be delayed.
Features
o Verify that the entries are of the correct format.
o No duplicate entries should be allowed.
o All links should take the user to the correct page.
TYPES OF TESTING
1. Black box testing
2. White box testing
Disadvantages
Inefficient testing, due to the fact that the tester only has limited
knowledge about an application.
Advantages
Disadvantages
Due to the fact that a skilled tester is needed to perform white box
testing, the costs are increased.
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. It provides a way to check the functionality of components, sub
assemblies, assemblies and/or a finished product It is the process of
exercising software with the intent of ensuring that the Software system
meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type
addresses a specific testing requirement.
Unit Testing
Unit testing involves the design of test cases that validate that the
internal program logic is functioning properly, and that program inputs
produce valid outputs. All decision branches and internal code flow
should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before
Integration Testing
Integration tests are designed to test integrated software
components to determine if they actually run as one program. Testing is
event driven and is more concerned with the basic outcome of screens or
fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the
combination of components is correct and consistent. Integration testing
is specifically aimed at
combination of components.
Functional Testing
Functional tests provide systematic demonstrations that functions
tested are available as specified by the business and technical
requirements, system documentation, and user manuals.
Functional testing is centered on the following items:
Valid Input
Invalid Input
Functions
Output
exercised.
Systems/ Procedures : interfacing systems or procedures must be
invoked.
Organization and preparation of functional tests is focused on
requirements, key functions, or special test cases. In addition, systematic
coverage pertaining to identify Business process flows; 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.
that: which I 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. Yes, I know this is boring! 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 quickly find the bugs, but you dont want to feel this is
some sort of worthless tax strategy imposed by the company you work
for to get code out of the door to the customer. So once you have coded
your functions, units, modules, sub-system you need to test it and find
the bugs - they will exist! Once you have a tested system and your
system fails - maybe a bug not uncovered during testing - then you need
to debug. In fact solving problems found while testing also requires a set
of debugging tools and strategies.
Types of Errors
The major groups of errors found in system development are
requirement spec, design spec and coding errors. In what follows, we
discuss these common types of errors found in systems.
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.
Coding Errors
The main error people associate with software is coding errors. We
all make coding errors. Having a solid Design Spec to work from that
has gone through a rigorous review helps. Translating that spec to an
Implementation Spec that we have discussed in this course is the next
step. Once code is written and unit tested (we will discuss this in the
next lecture) then desk checking your code is your best friend - more
on coding inspection below.
Make believe that you are the computer executing the code line by
line - update the data structures just like your code. Study the IO in your
code as you execute it. You will find many errors this way. Even better
ask another person working in the project but not familiar with your
code to desk check your code. Sometimes 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.
TEST CASES
FIELD_NAME
User Name
Password
VALID INPUT
ERROR
REMARKS
FORMAT
MESSAGE
Character
Error message is
shown to the user
if the character is
not given properly
Character
Number
can
either
character or
is
not
given properly
Phone Number
Number
number
Agent Character
Name
Date of Join
FUTURE ENHANCEMENT
The project has met the standards required to work at
College Site. The project can be used as an availability to develop a
project for a different company with different business logic where in
the commonalties in certain areas remains the same at any business
level. By using the common features in future development the
development time as well as the cost of development can be decreased
considerably. This web application has been incorporated using PHP.
SOURCE CODE
USER REGISTRATION
<?php
error_reporting (0);
ob_start();
session_start();
require_once 'config/config.php';
if(isset($_POST['submit']))
{
$fullname=$_POST['fullname'];
$gender=$_POST['gender'];
$username=$_POST['username'];
$password=$_POST['passsword'];
$insert_query="insert into ict_user(name,gender,user_name,password)
values('$fullname','$gender','$username','$password');";
$result = @mysql_query($insert_query);
//Check whether the query was successful or not
if($result) {
?>
<script language='javascript'>
alert('Registration success');
window.location.href = "login.php";
</script>
<?php
}
else
{
echo "Query failed";
}
}
?>
DATABASE CONNECTION
<?php
//Give your mysql username password and database name
$con=mysqli_connect("localhost","root","","chat");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?>
MEMBER LOGIN
<?php
$con=mysqli_connect("localhost","root","","share");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$un=$_POST['username'];
$pw=$_POST['pass'];
$result = mysqli_query($con,"SELECT * FROM `memreg` WHERE
uname='$un' AND
pass='$pw'");
if(mysqli_num_rows($result) == 1)
{
session_start();
$_SESSION['uname']=$un;
header('Location:memberhome.php');
}
else
{
echo 'wrong username or password';
echo '<a href="register.php">go back</a>';
}
?>
}
$result = mysqli_query($con,"SELECT * FROM memreg");
echo "<table border='1' bgcolor='#0DC7E5' width='100%'>
<tr>
<th>MEMBER NAME</th>
<th>FULL NAME</th>
<th>EMAIL</th>
<th>DATE OF BIRTH</th>
<th>DATE OF JOIN</th>
</tr>";
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['uname'] . "</td>";
echo "<td>" . $row['fname'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td>" . $row['dob'] . "</td>";
echo "<td>" . $row['doj'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>
GROUP DETAILS
<?php
$con = mysqli_connect("localhost","root","","share");
if(mysqli_connect_errno())
{
echo "failed to connect" . mysqli_error();
}
$memname = mysqli_real_escape_string($con, $_POST['memname']);
$groupname = mysqli_real_escape_string($con, $_POST['groupname']);
$groupid = mysqli_real_escape_string($con, $_POST['groupid']);
$doc = mysqli_real_escape_string($con, $_POST['doc']);
$groupdes = mysqli_real_escape_string($con, $_POST['groupdes']);
$sql = "INSERT INTO reg (memname, groupname, groupid,
doc,groupdes) VALUES('$memname', '$groupname', '$groupid', '$doc',
'$groupdes')";
if(!mysqli_query($con,$sql))
{
die('Errror:' . mysqli_error($con));
}
else
echo "successfully Create group";
echo '<a href="memberhome.php">Go back</a>';
?>
CHATING PAGE
<?php
// simple chat class
class SimpleChat {
// DB variables
var $sDbName;
var $sDbUser;
var $sDbPass;
// constructor
function SimpleChat() {
//mysql_connect("localhost","username","password");
$this->sDbName = 'chat';
$this->sDbUser = 'root';
$this->sDbPass = '';
}
// adding to DB table posted message
function acceptMessages() {
if ($_COOKIE['member_name']) {
require_once('chat_end.html');
return ob_get_clean();
}
}
?>
REFERENCES