Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 27

Web based chat application with webcam using PHP

Seminar II report submitted in partial fulfillment of the


Requirements for the Degree of

Bachelor of Technology
In
Computer Engineering
Submitted by
Mayuri Jadhav

DEPARTMENT OF COMPUTER ENGINEERING


S.S.V.P.S.’s B.S. DEORE COLLEGE OF ENGINEERING, DHULE
2023-2024

1
Web based chat application with webcam using PHP

Seminar II report submitted in partial fulfillment of the


Requirements for the Degree of

Bachelor of Technology
In
Computer Engineering
Submitted by
Mayuri Jadhav
Guided by
Prof. H. P. Mande

DEPARTMENT OF COMPUTER ENGINEERING


S.S.V.P.S.’s B.S. DEORE COLLEGE OF ENGINEERING, DHULE
2023-2024

2
S.S.V.P.S.’s B.S. DEORE COLLEGE OF ENGINEERING, DHULE

DEPARTMENT OF COMPUTER ENGINEERING

CERTIFICATE

This is to certify that the Seminar II entitled “web based chat application
with webcam using PHP” has been carried out by
Mayuri Jadhav

under my guidance in partial fulfillment of the degree of Bachelor of


Technology in Computer Engineering of Dr.Babasaheb Ambedkar
Technological University, Lonere (M.S ) during the academic year 2023-
24. To the best of my knowledge and belief this work has not been
submitted elsewhere for the award of any other degree.

Date Guide
Place: Dhule Prof. H.P.Mande

Head Principal
Prof. Dr. B. R. Mandre Prof.Dr. Hitendra D. Patil

Seminar co-ordinater
Prof.B.D.Patil
Prof P.P.Patil
Prof.P.S.Gangurade

3
ACKNOWLEDGEMENT
This Seminar II report has taken its current shape after a lot of hard work and
perseverance-not only just by me. I would like to express my sincere gratitude for
the assistance and support of a number of people who are helping to make this
success.
Immeasurable appreciation and deepest gratitude are extended for the help and
support to Prof. H.P.Mande my guide for his guidance and enlightening comments
throughout the seminar work. It has been an altogether different experience to work
with him and I would like to thank for his helpful suggestion and numerous
discussions. I gladly take this opportunity to thank Prof. DR.B. R. Mandre (Head
Of Department, Computer Engineering) and Prof.Dr. Hitendra D. Patil (Principal,
SSVPS, BSD, College of Engineering, Dhule) for providing facilities during
progress of the thesis.
I wish to express my sincere thanks to Prof.H.P.Mande for his expert, sincere
and valuable guidance and encouragement extended to me.
I am also thankful to all those who helped me directly or indirectly to develop
this thesis and complete it successfully. Then I would like to thank all the Staff for
their encouragement. They had always been very prompt at extending in their
helping hand and sharing valuable technical knows. Special thanks to my Family
and Friends.

Mayuri Jadhav

4
Table of Contents
Sr.no Page no

1. INTRODUCTION………………………………………… 1

1.1 What are the chat appliacations?.......................................... 1


1.2 The role of PHP in chat appliacation……………………… 2
1.3 Web server environment…………………………………... 3
1.4 Code editor………………………………………………… 3
1.5 Database management system……………………………... 3
1.6 Creating the chat interface…………………………………. 4

2. LITRETURE SURVEY…………………………………………... 5

2.1 Evolution of PHP Applications: A Systematic


Literature Review……………………………………….... 5
2.2 Analysis and Practical Application of PHP Frameworks in
Development of Web Information Systems………………. 5

3. SYSTEM ARCHITECTURE…………………………………….. 7

3.1 System architecture………………………………………… 7

3.2 Chat app or client side……………………………………… 8

4. ADVANTAGES………………………………………………….. 10

5. DISADVANTAGES………………………………………………. 11

6. APPLICATION……………………………………………………. 12

7. CONCLUSION……………………………………………………. 13

8. BIBLOGRAPHY………………………………………………….. 14

5
FIGURE INDEX

Sr.no Name of figures Page


no

Figure 1.1 PHP………………………………………………………………………. 1

Figure3.1 System architecture……………………………………………………… 7

Figure3.2 Package.json file of Client-side…………………………………………. 9

Figure3.3 Client-Side Structure Tree……………………………………………….. 9

VI
ABSTRACT

In this chat application, when you open it first on your browser, there is shown a signup form
where you have to signup with your details like name, email, password, and image. Email and
image field is fully validated which means you’ve to enter a valid email and an image file only.
Once you signed up successfully, you’ll be redirected to the user’s page where you can see your
full name, image, status, and logout button to the top, and users, like you, appear on the bottom if
someone has signed up.On this page, you can see their image, name, status, and the last message if
they sent to you. You have to click on the particular user or you can also search any existing user
with their name then you’ll be redirected to the chat page and there you can see the image, name,
status of that user who is going to chat.Once you send a message to another user then immediately
that message appears in your chat box and another user chatbox too which you’ve sent the
message. On the message receiver chatbox, this user received the message with the sender image.
Remember chatbox will be automatically scrolled to the bottom once the chatbox starts scrolling.
You can log out from the chat application at any time and once you log out, immediately all other
users will know that you’ve been log out or offline.

VII
Chapter- 1
INTRODUCTION
This chapter gives Simply put, your dissertation’s introduction chapter needs to provide an
overview of your planned research, as well as a clear rationale for it. In other words, this chapter
has to explain the “what” and the “why” of your research – what’s it all about and why’s that
important.

1.1 What are Chat Applications?

Chat applications, often referred to as instant messaging apps, enable individuals and groups to
exchange text, multimedia, and even conduct voice and video calls in real-time over the internet.
These applications have transformed the way we communicate, making it possible to connect with
people across the globe instantly.

Chat applications are used in various domains, including:

 Social Networking: Platforms like Facebook Messenger, WhatsApp, and Snapchat


facilitate personal and group conversations.
 Business Collaboration: Tools like Slack and Microsoft Teams help teams
collaborate and communicate effectively.
 Customer Support: Live chat support on websites allows businesses to assist
customers in real-time.
 Gaming: In-game chat features enable players to strategize and interact while gaming.
 Education: Chat applications are used in online learning platforms for student-teacher
interactions.

Figure 1.1 PHP


g 1
1.2The Role of PHP in Chat App Development
PHP (Hypertext Preprocessor) is a versatile and widely-used server-side scripting language.
It is renowned for its ability to handle web-based tasks and server-side operations efficiently.
When it comes to developing chat applications, PHP offers several advantages:

1. Real-time Communication: PHP can be used to implement real-time features in chat


applications. It can handle server push mechanisms like WebSockets, making it suitable
for instant messaging.
2. Compatibility: PHP is compatible with various databases, making it easy to store
and retrieve chat messages and user data.
3. Rich Ecosystem: PHP has a vast community and a rich ecosystem of libraries and
frameworks that simplify the development process.
4. Cost-effective: PHP is open-source, making it a cost-effective choice for startups and
small businesses looking to develop chat applications without high licensing fees.
5. Scalability: With proper architecture and design, PHP-based chat applications can be
scaled to accommodate a growing user base.
Choosing the right technology stack for your chat application is crucial. PHP stands out as an
excellent choice for several reasons:

 Ease of Learning: PHP has a relatively low learning curve, making it accessible to
developers with varying levels of experience.
 Community Support: PHP has a vibrant and active community that continuously
contributes to its development. This means you can find ample resources and support
online.
 Rapid Development: PHP’s simplicity and versatility allow for quick development
and deployment of chat applications, helping you get your product to market faster.
 Cross-Platform Compatibility: PHP works seamlessly across different operating
systems and web servers, ensuring broad compatibility.
1.0.3Required Tools and Technologies

Before we get started with building our PHP-based chat application, let’s ensure that you
have the necessary tools and technologies in place. Here’s what you’ll need:

g 2
1.2 Web Server Environment

To run PHP scripts locally for development, you can set up a web server environment. You can
choose from various options, but some of the most common ones include:

 XAMPP: XAMPP is a free and open-source platform that bundles Apache, MySQL,
PHP, and other useful tools. It’s available for Windows, macOS, and Linux.
 MAMP: MAMP is another popular choice for macOS users, offering a simple way to
set up a local server environment.
 WAMP: If you’re using Windows, WAMP provides an easy-to-install package with
Apache, MySQL, and PHP.
 LAMP: For Linux users, LAMP (Linux, Apache, MySQL, PHP) is a classic stack that
can be configured manually.

1.3 Code Editor


You’ll need a code editor for writing PHP code. Some popular choices include:

 Visual Studio Code: A lightweight, free code editor with excellent PHP support and a
wide range of extensions.
 PHP Storm: A robust PHP-specific IDE with features tailored for PHP development.
 Sublime Text: A highly customizable and lightweight code editor suitable for PHP
development

1.4 Database Management System


For storing chat messages and user data, you’ll need a database management system. MySQL and
PostgreSQL are commonly used choices. Make sure you have the database system of your choice
installed and configured.

1.3.1 Setting Up the Development Environment

Now, let’s walk through the steps of setting up a basic development environment using XAMPP as
an example:

g 3
1. Install XAMPP:
 Download and install XAMPP from the official website based on your
operating system.
2. Start Apache and MySQL:
 Launch the XAMPP Control Panel and start the Apache and MySQL services
3. Create a Project Folder:
 Create a new folder in the “htdocs” directory (usually located in the
XAMPP installation folder) to host your chat application project.
4. Write Your First PHP Script:
 Open your chosen code editor and create a new PHP file within your
project folder.For example,name it“index.php.”
<?php
echo“Hello,Wor
ld!”;
?>

1.5 Creating the Chat Interface

A user-friendly and visually appealing chat interface is crucial for a successful chat application. It
enhances the user experience and encourages engagement. In this section, we’ll explore how to
create a basic chat user interface using HTML, CSS, and PHP.

g 4
Chapter - 2
LITERATURE SURVEY
In this section we outline the following main aspects of chatbots based on our finding from the
literature review: implementation approaches, available public database used in previous data-
driven approaches to chatbot implementation, the main evaluation methods for measuring the
performance of chatbots and the application of chatbots in different domains.

Evolution of PHP
Applications:
A Systematic Literature
Review
https://doi.org/10.3991/ijes.v5i1.6437
Douglas Kunda
Mulungushi University, Kabwe, Zambia
dkunda@mu.ac.zm
Alinaswe Siame,
Mulungushi University, Kabwe, Zambia
alinaswe7@gmail.com
Abstract—This paper reviews, some of the
research work done in the evo-
lution of PHP applications that have been
around and are vastly used. PHP is
g 5
currently one of the most popular programming
languages, widely used in both
the open source community and in industry to
build large web-focused applica-
tions and application frameworks. This review
looks at how PHP applications
have evolved in terms of the use of libraries,
the software maturity, adoption of
object-orientation paradigm, the evolution of
complexity and security. The re-
sults suggest that these systems undergo
systematic maintenance and evolution
is helping the underlying programming
language to grow.
Keywords—software evolution; web
applications; object-orientated program-
ing; software libraries; PHP; scripting language
Evolution of PHP
Applications:

g 6
A Systematic Literature
Review
https://doi.org/10.3991/ijes.v5i1.6437
Douglas Kunda
Mulungushi University, Kabwe, Zambia
dkunda@mu.ac.zm
Alinaswe Siame,
Mulungushi University, Kabwe, Zambia
alinaswe7@gmail.com
Abstract—This paper reviews, some of the
research work done in the evo-
lution of PHP applications that have been
around and are vastly used. PHP is
currently one of the most popular programming
languages, widely used in both
the open source community and in industry to
build large web-focused applica-
tions and application frameworks. This review
looks at how PHP applications
have evolved in terms of the use of libraries,
the software maturity, adoption of
g 7
object-orientation paradigm, the evolution of
complexity and security. The re-
sults suggest that these systems undergo
systematic maintenance and evolution
is helping the underlying programming
language to grow.
Keywords—software evolution; web
applications; object-orientated program-
ing; software libraries; PHP; scripting language
Evolution of PHP
Applications:
A Systematic Literature
Review
https://doi.org/10.3991/ijes.v5i1.6437
Douglas Kunda
Mulungushi University, Kabwe, Zambia
dkunda@mu.ac.zm
Alinaswe Siame,
Mulungushi University, Kabwe, Zambia
alinaswe7@gmail.com
g 8
Abstract—This paper reviews, some of the
research work done in the evo-
lution of PHP applications that have been
around and are vastly used. PHP is
currently one of the most popular programming
languages, widely used in both
the open source community and in industry to
build large web-focused applica-
tions and application frameworks. This review
looks at how PHP applications
have evolved in terms of the use of libraries,
the software maturity, adoption of
object-orientation paradigm, the evolution of
complexity and security. The re-
sults suggest that these systems undergo
systematic maintenance and evolution
is helping the underlying programming
language to grow.
Keywords—software evolution; web
applications; object-orientated program-
ing; software libraries; PHP; scripting language

g 9
Evolution of PHP
Applications:
A Systematic Literature
Review
https://doi.org/10.3991/ijes.v5i1.6437
Douglas Kunda
Mulungushi University, Kabwe, Zambia
dkunda@mu.ac.zm
Alinaswe Siame,
Mulungushi University, Kabwe, Zambia
alinaswe7@gmail.com
Abstract—This paper reviews, some of the
research work done in the evo-
lution of PHP applications that have been
around and are vastly used. PHP is
currently one of the most popular programming
languages, widely used in both
the open source community and in industry to
build large web-focused applica-

g 10
tions and application frameworks. This review
looks at how PHP applications
have evolved in terms of the use of libraries,
the software maturity, adoption of
object-orientation paradigm, the evolution of
complexity and security. The re-
sults suggest that these systems undergo
systematic maintenance and evolution
is helping the underlying programming
language to grow.
Keywords—software evolution; web
applications; object-orientated program-
ing; software libraries; PHP; scripting language
2.1 Evolution of PHP Applications: A Systematic Literature Review
PHP is a scripting language that runs on servers and is frequently used for creating websites. It was
developed by Rasmus Lerdorf in the middle of the 1990s and has since grown to be one of the most
well-liked programming languages for creating dynamic web applications. PHP is available to
developers of all experience levels because it is open-source and cost-free to use. PHP can be
directly inserted into HTML code, making it especially well-suited for web development.
Additionally, PHP supports a large number of databases, such as MySQL, Oracle, and PostgreSQL,
making it a potent tool for creating intricate web applications. This paper contains an introduction to
the PHP programming language, what PHP means, what PHP is used for, who uses it, its advantages
and disadvantages, its basic syntax, and why it is popular compared to other languages. Some other
features are included in this paper to help you easily understand the PHP programming language.
This includes ten reasons to learn PHP and the various applications of PHP programming.

2.2 Analysis and Practical Application of PHP Frameworks in


g 11
Development of Web Information Systems

This paper provides various PHP programming framework (CakePHP2, CodeIgniter, Symfony2, Yii
and PhalconPHP) popularity overview and comparison using various criteria. Based on the data
obtained during the study two frameworks were selected for deeper analysis - Symfony2 and
PhalconPHP. This article offers a description of the architecture and main features of selected
frameworks (routing, template engine, etc.). During framework comparison a performance test was
developed with a goal to determine performance and effectiveness of frameworks during the same
task. For performance testing a „Ticket Reserving System” cashier list section was chosen. Tests
were performed using ab.exe (Apache Benchmark) tool that comes with the Apache Web server.
Based on the comparison results recommendations are made that allow Web developers to choose a
framework for creating a real-world Web project. It is planned to expand the developed Web system
capabilities using Web services that are based on open standards and protocols (SOAP, XML-RPC,
REST, etc.).

g 12
Chapter - 3
SYSTEM ARCHITECTURE

This chapter gives the description of the system in detail. It gives details information about
proposed system with the benefits and architecture of the model.

3.1 Chat Architecture: How We Approach It

Fig 3.1 architecture of chat application

g 13
A chat consists of two major parts

 Chat App or client part, which is a Web chat application. Build on React
 Chat Server Engine or server part, which is a pool of external servers responsible
for the chatoperation. This is the place where all the chat magic happens.

Both parts contain various components that communicate to each other and bring the
chat into action

3.2 Chat App or Client Side

Chat App is the other major part of the chat architecture, the one that users directly
interact with. It's split into two separate root components:

 Chat Client Engine (fig.3.2) handles all the communication with the Chat Server Engine
via its internal components: Chat REST API Client Libraryand Chat WebSocket Client
Library.
 Chat UI displays data to users: Chat Contact List UI, Chat Dialog UI

Component:
Components are the building blocks of any React app and a typical React app will have
many of these. Simplyput, a component is a JavaScript class or function that optionally
accepts inputs i.e. properties(props) and returns a React element that describes how a section
of the UI (User Interface) should appear.

App.js is the starting point of our React app.A package.json file(fig.3.3):


 lists the packages your project depends on
 specifies versions of a package that your projectcan use.

8
Figure 3.2 Package.json file of
Client-side

Figure 3.3 Client-Side


Structure Tree

9
Chapter - 4

ADVANTAGES

 Faster support

Obviously chat is easy to reach for your customers, but what’s more is that the average
resolution time is significantly lower than with traditional service channels. It takes less
than a minute to resolve a customer issue using live chat.

 Real-time text preview


One of the handy advantages of live chat is the option to see a real-time preview of what
the customer is typing before she hits enter. It gives your chat agent the chance to think
about a solution, research and impress users with prompt, customized answers.

 Instant customer feedback

feedbackFeedback is easily collectable. Users can rate your chat service right after
their interaction with you. This is a benefit for your service agents too because they get
instant feedback on their performance. This makes it easy for them to connect the dots.

 Less drama
Chat agents experience less emotional exhaustion after difficult service interactions. It’s
easier to distance yourself from a mean text than a shouting customer hurling complaints

 Prevents agent fatigue


Avoid one of the main burnout reasons in customer service: boredom. By preparing
templates (Chat Macros) for frequently asked questions, chat agents have more time to
focus on complex issues and personal customer interactions.

10
Chapter - 5
DISADVANTAGES

 Constant monitoring

To provide the immediate responses that live chat promises, businesses must ensure that
the channel is monitored continuously when online. This can be challenging, especially for
small businesses or those operating across multiple time zones. While this is a
disadvantage of live chat, a chatbot can solve this by providing 24/7 support.

 Miscommunication

The absence of verbal cues and tone can sometimes lead to misunderstandings between the
customer service representative and the customer. This is particularly true for complex
issues that might be easier to resolve through voice communication. If this is a concern for
you, then adopt a live chat solution that offers

 Training

Effective live chat support requires representatives to be skilled at multitasking and typing,
as well as having in-depth knowledge of the business’s products or services. As a result,
training staff to meet these requirements can be resource intensive. To overcome this
potential live chat disadvantage, ensure you choose software that is easy to use, offers
internal knowledge bases, and has AI-powered agent support tools.

11
Chapter - 6
APPLICATION

 Chatbots are applied in many different domains. As far as Education and Research go,
chatbots in this domain seem to be mostly Information Retrieval or AIML based. Little to
no Deep Learning application have been used in these fields. The choice seems justified by
the fact that chatbots created for educational purposes are often aimed at providing specific
information (such as class schedules) or educational material. Refs. all provide examples
of chatbots applied to Education and Research. For similar reasons as in the field of
education, most HealthCare oriented chatbots are Information Retrieval based. provide
different examples of chatbots applications in HealthCare.
 E-commerce oriented chatbots present different configurations, mostly Information
Retrieval based configurations, but with some Deep Learning algorithms also involved in
the overall architecture. This is possibly because in e-commerce, chatbots are often used
to provide customer support. Therefore, they must be able not only to provide information
on the products’ catalogue and purchasing experience, but also conversing with the
customer. provide different examples of chatbots applied to e-commerce.
 Other Information Retrieval based chatbots applications can be found in Training
[Information Technology [and Finance possibly for similar reasons.
 Sequence to Sequence chatbots with attention mechanisms have been used to provide Law
and Human Resource services, respectively inIn the first case the chatbot is Long Short-
Term Memory (LSTM) based, while in the second case it is based on Bidirectional-Gated
Recurrent Units. As shown, when applied to a specific domains chatbots tend to fall back
to Information Retrieval systems and Rule-based systems, or a combination of the two.
Only a few examples of applications have used Machine Learning technologies. This can
be due to several factors:
 Chatbots, when they are not used for social or companion chatbots, are usually applied to
a specific domain, which means that they require domain-specific training data (e.g.,
products information and details, financial information, educational material, healthcare
information). This type of data is often confidential due to its nature; they are not readily
available in open access to train a Deep Learning engine. Furthermore, given the nature of
the data needed and of the tasks the chatbot is required to carry out (e.g., access a

12
Chapter - 7
CONCLUSION

In this paper we have provided a survey of relevant works of literature on the subject, and we
have analysed the state of the art in terms of language models, applications, datasets used, and
evaluation frameworks. We have also underlined current challenges and limitations, as well as
gaps in the literature. Despite technological advancements, AI chatbots are still unable to
simulate human speech. This is due to a faulty approach to dialogue modeling and a lack of
domain-specific data with open access. For Information Retrieval chatbots, there is also a lack
of a learnt AI model. A model like this might be used in a variety of sectors. There is still a gap
to be closed in terms of applications between industry models and current advancements in the
sector.

13
BIBLIOGRAPHY
1. Jia, J. The Study of the Application of a Keywords-based Chatbot System on the Teaching of
Foreign Languages. arXiv 2003, arXiv:cs/0310018. [Google Scholar]
2. Sojasingarayar, A. Seq2Seq AI Chatbot with Attention Mechanism. Master’s Thesis,
Department of Artificial Intelligence, IA School/University-GEMA Group, Boulogne-
Billancourt, France, 2020. [Google Scholar]
3. Bala, K.; Kumar, M.; Hulawale, S.; Pandita, S. Chat-Bot For College Management System
Using A.I. Int. Res. J. Eng. Technol. (IRJET) 2017, 4, 4. [Google Scholar]
4. Ayanouz, S.; Abdelhakim, B.A.; Benhmed, M. A Smart Chatbot Architecture based NLP and
Machine Learning for Health Care Assistance. In Proceedings of the 3rd International
Conference on Networking, Information Systems & Security, Marrakech, Morocco, 31 March–
2 April 2020; pp. 1–6. [Google Scholar] [CrossRef]
5. Kumar, R.; Ali, M.M. A Review on Chatbot Design and Implementation Techniques. Int. J.
Eng. Technol. 2020, 7, 11. [Google Scholar] [CrossRef] [Green Version]
6. Cahn, J. CHATBOT: Architecture, Design, & Development. Ph.D. Thesis, University of
Pennsylvania, School of Engineering and Applied Science, Philadelphia, PA, USA, 2017.
[Google Scholar]
7. Okuda, T.; Shoda, S. AI-based Chatbot Service for Financial Industry. FUJITSU Sci. Tech.
J. 2018, 54, 5. [Google Scholar]
8. Brandtzaeg, P.B.; Følstad, A. Why People Use Chatbots. In Internet Science; Kompatsiaris, I.,
Cave, J., Satsiou, A., Carle, G., Passani, A., Kontopoulos, E., Diplaris, S., McMillan, D., Eds.;
Lecture Notes in Computer Science; Springer International Publishing: Berlin/Heidelberg,
Germany, 2017; Volume 10673, pp. 377–392. [Google Scholar]
9. Costa, P. Conversing with personal digital assistants: On gender and artificial intelligence. J.
Sci. Technol. Arts 2018, 10, 59–72. [Google Scholar] [CrossRef] [Green Version]
10. Go, E.; Sundar, S.S. Humanizing chatbots: The effects of visual, identity and conversational
cues on humanness perceptions. Comput. Hum. Behav. 2019, 97, 304–316. [Google Scholar]
[CrossRef]
11. Luo, X.; Tong, S.; Fang, Z.; Qu, Z. Frontiers: Machines vs. Humans: The Impact of Artificial
Intelligence Chatbot Disclosure on Customer Purchases. Mark. Sci. 2019, 38, 913–1084.
[Google Scholar] [CrossRef]
12. Christensen, S.; Johnsrud, S.; Ruocco, M.; Ramampiaro, H. Context-Aware Sequence-to-
Sequence Models for Conversational Systems. arXiv 2018, arXiv:1805.08455. [Google
Scholar]

You might also like