0% found this document useful (0 votes)
271 views

Chatbot Using PHP: Department of Computer Engineering

The document describes a micro project report on building a chatbot using PHP. It includes the title page with student names and faculty guide. It also includes introduction on chatbots, aim of building this chatbot project, intended course outcomes, literature review on chatbots, and proposed methodology which involves building PHP code for the chatbot interface and functionality.

Uploaded by

irfan Nadaf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
271 views

Chatbot Using PHP: Department of Computer Engineering

The document describes a micro project report on building a chatbot using PHP. It includes the title page with student names and faculty guide. It also includes introduction on chatbots, aim of building this chatbot project, intended course outcomes, literature review on chatbots, and proposed methodology which involves building PHP code for the chatbot interface and functionality.

Uploaded by

irfan Nadaf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Shree Ambabai Talim Sanstha’s

SANJAY BHOKARE GROUP OF INSTITUTES, MIRAJ


FACULTY OF POLYTECHNIC
Institute Code: 1552

Department Of Computer Engineering


Micro Project Report
On

Chatbot using PHP


Prepared By

Roll no. Enrolment No. Name


3309 2015520025 Irfan Mahibub Nadaf
3310 2015520016 Sanam Samir Nadaf
3311 2015520017 Noorjahan Alamgir Qazi
3312 2115520114 Prachi Pramod Potadar

Under the Guidance of


Name Of Faculty

Submitted To

Maharashtra State Board of Technical Education, Mumbai


(Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)
Academic Year 2020-2021

1
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
(Only for individual micro project report)

This is to certify that Mr. / Ms. ………………………………………………………


Roll No. ……………….…., of ………... Semester of Diploma
in………………….. Engineering , of Institute ATS Sanjay Bhokare Group Of
Institutes, Faculty Of Polytechnic, Miraj. (Code: 1552) has completed the Micro-
Project work satisfactorily in course ………………………………. ( ) for
the academic year 20…….. to 20…….. as prescribed in the curriculum.

Place: …………… Enrollment No:.……………

Date: …………… Exam. Seat No: ……………

Subject Teacher Head of the Department Principal

2
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
(Only for Micro Project Group report )

This is to certify that following students,

Roll no. Enrolment No. Exam Seat No. Name

3309 2015520025 Irfan Mahibub nadaf

3310 201520016 Sanam Samir nadaf

3311 2015520017 Noorjahan Alamgir qazi

3312 2115520114 Prachi Pramod potadar

3322 1915520022 Abhishek Subhash Chougule

of …….. Semester of Diploma in………………….. Engineering , of Institute


ATS Sanjay Bhokare Group Of Institutes, Faculty Of Polytechnic, Miraj.
(Code: 1552) are completed the Micro Project work satisfactorily in course
………………………………. ( ) for the academic year 20…….. to 20……
as prescribed in the curriculum.

Place: ……………
Date: ……………

Subject Teacher Head of the Department Principal

3
Annexure – I
Format for Micro-Project Proposal in about 2 to 3 pages to be submitted at end of first two weeks of
the semester

PART A – Micro-Project Proposal

chatbot
1.0 Brief Introduction
A chatbot is a software application that can simulate human-like online conversations with a user. In
this tutorial, we are going to build a simple chatbot that provides real-time responses to some
common questions. It also answers with a fallback message when an unaccounted question is asked.
Chatbots are computer programs that can maintain a conversation with a user in natural language,
understanding their intent, and replying based on preset rules and data. Designed to convincingly
simulate the way a human would behave as a conversational partner, chatbot systems typically
require continuous tuning and testing with many in production unable to adequately converse; in
2012 none of them could pass the standard Turing test. The term "Chatterbot" was originally coined
by Michael Mauldin (creator of the first Verdot) in 1994 to describe these conversational programs.
2.0 Aim of the Micro-Project
This Micro-Project aims at:
a) Chatbots allow businesses to connect with customers in a personal way without the expense
of human representatives.
b) The purpose of chatbots is to provide an automated way for people to communicate with your
company.
3.0 Intended Course Outcome
a) develop program using control statement.
b) perform database operations in PHP.

4.0 Literature Review


(Existing status, knowledge about chosen task summarized from books, internet and
other sources in about 200 to 400)
Chatbots are intelligent conversational computer systems designed to mimic human conversation to
enable automated online guidance and support. The increased benefits of chatbots led to their wide
adoption by many industries in order to provide virtual assistance to customers. Chatbots utilize
methods and algorithms from two Artificial Intelligence domains: Natural Language Processing and
Machine Learning. However, there are many challenges and limitations in their application. In this
survey we review recent advances on chatbots, where Artificial Intelligence and Natural Language
processing are used. We highlight the main challenges and limitations of current work and make
recommendations for future research investigation
Chatbots are intelligent conversational computer programs that mimic human conversation in its
natural form [1,2,3]. A chatbot can process user input and produce an output [4,5]. Usually, chatbots

4
take natural language text as input, and the output should be the most relevant output to the user input
sentence. Chatbots can also be defined as “online human-computer dialogue system(s) with natural
language” [6]. Chatbots constitute therefore an automated dialogue system, that can attend to
thousands of potential users at once.
Chatbots are used in dialog systems for various purposes including customer service, request routing, or
information gathering. While some chatbot applications use extensive word-classification processes, natural-
language processors, and sophisticated AI, others simply scan for general keywords and generate responses using
common phrases obtained from an associated library or database.
Most chatbots are accessed on-line via website popups or through virtual assistants. They can be classified into
usage categories that include: commerce (e-commerce via chat), education, entertainment, finance, health, news,
and productivity

Reference:

1.  Caldarini, Guendalina; Jaf, Sardar; McGarry, Kenneth (2022). "A Literature Survey


of Recent Advances in Chatbots". Information. MDPI. 13 (1):
41. doi:10.3390/info13010041.
2. Luka Bradeško, Dunja Mladenić. "A Survey of Chabot Systems through a Loebner
Prize Competition". S2CID 39745939

4.0 Proposed Methodology


(Procedure in brief that will be followed to do the micro-project) in about 200 to 500 ]
Chat.php code:
<?php
  session_start();
  include_once "php/config.php";
  if(!isset($_SESSION['unique_id'])){
    header("location: login.php");
 }
?>
<?php include_once "header.php"; ?>
<body>
  <div class="wrapper">
    <section class="chat-area">
      <header>
        <?php
          $user_id = mysqli_real_escape_string($conn, $_GET['user_id']);
          $sql = mysqli_query($conn, "SELECT * FROM users WHERE unique_id = {$user_id}");
          if(mysqli_num_rows($sql) > 0){
            $row = mysqli_fetch_assoc($sql);
          }else{
            header("location: users.php");
     }
        ?>
        <a href="users.php" class="back-icon"><i class="fas fa-arrow-left"></i></a>
        <img src="php/images/<?php echo $row['img']; ?>" alt="">

5
        <div class="details">
          <span><?php echo $row['fname']. " " . $row['lname'] ?></span>
          <p><?php echo $row['status']; ?></p>
        </div>
      </header>
      <div class="chat-box">

      </div>
      <form action="#" class="typing-area">
        <input type="text" class="incoming_id" name="incoming_id" value="<?php echo $user_id; ?>" hidden>
        <input type="text" name="message" class="input-field" placeholder="Type a message here..."
autocomplete="off">
        <button><i class="fab fa-telegram-plane"></i></button>
      </form>
    </section>
  </div>

  <script src="javascript/chat.js"></script>
</body>
</html>
Index.php code:
<?php
  session_start();
  if(isset($_SESSION['unique_id'])){
    header("location: users.php");
 }
?>

<?php include_once "header.php"; ?>


<body>
  <div class="wrapper">
    <section class="form signup">
      <header>Realtime Chat App</header>
      <form action="#" method="POST" enctype="multipart/form-data" autocomplete="off">
        <div class="error-text"></div>
        <div class="name-details">
          <div class="field input">
            <label>First Name</label>
            <input type="text" name="fname" placeholder="First name" required>
          </div>
          <div class="field input">
            <label>Last Name</label>
            <input type="text" name="lname" placeholder="Last name" required>
          </div>
        </div>
        <div class="field input">
          <label>Email Address</label>
          <input type="text" name="email" placeholder="Enter your email" required>

6
        </div>
        <div class="field input">
          <label>Password</label>
          <input type="password" name="password" placeholder="Enter new password" required>
          <i class="fas fa-eye"></i>
        </div>
        <div class="field image">
          <label>Select Image</label>
          <input type="file" name="image" accept="image/x-png,image/gif,image/jpeg,image/jpg" required>
        </div>
        <div class="field button">
          <input type="submit" name="submit" value="Continue to Chat">
        </div>
      </form>
      <div class="link">Already signed up? <a href="login.php">Login now</a></div>
    </section>
  </div>

  <script src="javascript/pass-show-hide.js"></script>
  <script src="javascript/signup.js"></script>

</body>
</html>

5.0 Resources Required (major resources like raw material, tools, software etc.)
S. No. Name of Resource/material Specifications Qty Remarks
1 laptop Microsoft word
2

6.0 Action Plan (Sequence and time required for major activities for 8 Weeks)
S. No. Details of activity Planned Planned Name of
Start date Finish date Responsible Team
Members
1 Discussion and finalization of topic All members
2 Preparation of submission of All members
proposal
3 Planning layout of micro project All members
4 Content preparation All members
5 Discussion about required resources All members
6 Create the report All members
7 Final submission of project All members

**************

Annexure – II

7
Format for Micro-Project Report after Execution in about 8 to 15 pages to be submitted at end of
semester)
PART B – Micro-Project Report

Chatbot
1.0 Rationale
(Importance of the project, in about 100 to 200 words. This is a modified version of the
proposal after the work)
A chatbot or chatterbot is a software application used to conduct an online chat conversation via text
or text-to-speech, in lieu of providing direct contact with a live human agent.
A chatbot is a software application that can simulate human-like online conversations with a user. In
this tutorial, we are going to build a simple chatbot that provides real-time responses to some
common questions. It also answers with a fallback message when an unaccounted question is asked.
Chatbots are computer programs that are capable of maintaining a conversation with a user in natural language,
understanding their intent, and replying based on preset rules and data. Designed to convincingly simulate the way a
human would behave as a conversational partner, chatbot systems typically require continuous tuning and testing
with many in production unable to adequately converse; in 2012 none of them could pass the standard  Turing
test. The term "Chatterbot" was originally coined by Michael Mauldin (creator of the first Verdot) in 1994 to
describe these conversational programs.

2.0 Course Outcomes Addressed


a) develop program using control statement.
b) perform database operations in PHP.

3.0 Literature Review


(If additional literature review done, you may add in about 200 to 500 words)
Chatbots are intelligent conversational computer systems designed to mimic human conversation to
enable automated online guidance and support. The increased benefits of chatbots led to their wide
adoption by many industries in order to provide virtual assistance to customers. Chatbots utilize
methods and algorithms from two Artificial Intelligence domains: Natural Language Processing and
Machine Learning. However, there are many challenges and limitations in their application. In this
survey we review recent advances on chatbots, where Artificial Intelligence and Natural Language
processing are used. We highlight the main challenges and limitations of current work and make
recommendations for future research investigation
Chatbots are intelligent conversational computer programs that mimic human conversation in its
natural form [1,2,3]. A chatbot can process user input and produce an output [4,5]. Usually, chatbots
take natural language text as input, and the output should be the most relevant output to the user input
sentence. Chatbots can also be defined as “online human-computer dialogue system(s) with natural
language” [6]. Chatbots constitute therefore an automated dialogue system, that can attend to
thousands of potential users at once.
Chatbots are used in dialog systems for various purposes including customer service, request routing, or
information gathering. While some chatbot applications use extensive word-classification processes, natural-

8
language processors, and sophisticated AI, others simply scan for general keywords and generate responses using
common phrases obtained from an associated library or database.
Most chatbots are accessed on-line via website popups or through virtual assistants. They can be classified into
usage categories that include: commerce (e-commerce via chat), education, entertainment, finance, health, news,
and productivity
Reference:

1.  Caldarini, Guendalina; Jaf, Sardar; McGarry, Kenneth (2022). "A Literature Survey of


Recent Advances in Chatbots". Information. MDPI. 13 (1): 41. doi:10.3390/info13010041.
2. Luka Bradeško, Dunja Mladenić. "A Survey of Chabot Systems through a Loebner Prize
Competition". S2CID 39745939

4.0 Actual Methodology Followed


Chat.php code:
<?php
  session_start();
  include_once "php/config.php";
  if(!isset($_SESSION['unique_id'])){
    header("location: login.php");
 }
?>
<?php include_once "header.php"; ?>
<body>
  <div class="wrapper">
    <section class="chat-area">
      <header>
        <?php
          $user_id = mysqli_real_escape_string($conn, $_GET['user_id']);
          $sql = mysqli_query($conn, "SELECT * FROM users WHERE unique_id = {$user_id}");
          if(mysqli_num_rows($sql) > 0){
            $row = mysqli_fetch_assoc($sql);
          }else{
            header("location: users.php");
     }
        ?>
        <a href="users.php" class="back-icon"><i class="fas fa-arrow-left"></i></a>
        <img src="php/images/<?php echo $row['img']; ?>" alt="">
        <div class="details">
          <span><?php echo $row['fname']. " " . $row['lname'] ?></span>
          <p><?php echo $row['status']; ?></p>
        </div>
      </header>
      <div class="chat-box">

      </div>
      <form action="#" class="typing-area">

9
        <input type="text" class="incoming_id" name="incoming_id" value="<?php echo $user_id; ?>" hidden>
        <input type="text" name="message" class="input-field" placeholder="Type a message here..."
autocomplete="off">
        <button><i class="fab fa-telegram-plane"></i></button>
      </form>
    </section>
  </div>

  <script src="javascript/chat.js"></script>
</body>
</html>
Index.php code:
<?php
  session_start();
  if(isset($_SESSION['unique_id'])){
    header("location: users.php");
 }
?>

<?php include_once "header.php"; ?>


<body>
  <div class="wrapper">
    <section class="form signup">
      <header>Realtime Chat App</header>
      <form action="#" method="POST" enctype="multipart/form-data" autocomplete="off">
        <div class="error-text"></div>
        <div class="name-details">
          <div class="field input">
            <label>First Name</label>
            <input type="text" name="fname" placeholder="First name" required>
          </div>
          <div class="field input">
            <label>Last Name</label>
            <input type="text" name="lname" placeholder="Last name" required>
          </div>
        </div>
        <div class="field input">
          <label>Email Address</label>
          <input type="text" name="email" placeholder="Enter your email" required>
        </div>
        <div class="field input">
          <label>Password</label>
          <input type="password" name="password" placeholder="Enter new password" required>
          <i class="fas fa-eye"></i>
        </div>
        <div class="field image">
          <label>Select Image</label>
          <input type="file" name="image" accept="image/x-png,image/gif,image/jpeg,image/jpg" required>

10
        </div>
        <div class="field button">
          <input type="submit" name="submit" value="Continue to Chat">
        </div>
      </form>
      <div class="link">Already signed up? <a href="login.php">Login now</a></div>
    </section>
  </div>

  <script src="javascript/pass-show-hide.js"></script>
  <script src="javascript/signup.js"></script>

</body>
</html>

5.0 Actual Resources Used (Mention the actual resources used).

S. No. Name of Resource/material Specifications Qty Remarks


1
2

6.0 Outputs of the Micro-Project


(Drawings of the prototype, drawings of survey, presentation of collected data, findings etc.)

11
7.0 Skill Developed / learning out of this Micro-Project
(in about 50 to 100 words)
A chatbot is the user interface of a given chat application. Here in this project we developed
some skill about how to develop chatbot and give functions required to the user need.
We also come to know about my sql database handling.

8.0 Applications of this Micro-Project


(in about 50 to 100 words)
The following are the applications of chatbot:
a. Messaging apps
b. Company internal platforms
c. Customer service
d. Healthcare

12
e. Politics
f. Toys
9.0 Area of Future Improvement
The future of chatbots is that businesses will automate simple payments and allow users to pay
directly over live chat or Facebook Messenger apps. The instant process makes the customer happy
and improves customer satisfaction.
Chatbots are increasingly present in businesses and often are used to automate tasks that do not require skill-based
talents. With customer service taking place via messaging apps as well as phone calls, there are growing numbers of
use-cases where chatbot deployment gives organizations a clear return on investment. Call center workers may be
particularly at risk from AI-driven chatbots.
Unclear scope of the chatbot and/or too broad purposes of its utilization. ...
Setting unrealistic expectations is often the reason why chatbots fail. ...
Lack of customer perspective in building the chatbot.
**************

13
Annexure – III

Teacher Evaluation Sheet

Name of Student: ………………………………………………………… Enrollment No.


……………………………………
Name of Programme………………………………………………… Semester:
………………………………………… Course Title
……………………………………………………………….. Code:
………………………………………………………………

Title of the Micro-Project:


…………………………………………………………………………………………………….

(For Office Use Only)


Course Outcomes Achieved
……………………………………………………………………………………………………………………
…………………………..
……………………………………………………………………………………………………………………
……………………………
……………………………………………………………………………………………………………………
…………………………….
Evaluation as per Suggested Rubric for Assessment of Micro Project
 (Please tick in appropriate cell for each characteristic)
S. Characteristic Poor Average Good Excellent
No to be assessed ( Marks 1-3 ) ( Marks 4 - 5 ) ( Marks 6 - 8 ) ( Marks 9- 10 )
.
1 Relevance to the Relate to very Related to some Take care of at- Take care of more
course few LOs Los least one CO than one CO
 ..
2 Literature Not more than At-least 5 relevant At –least 7 About 10 relevant
Survey two sources sources, at least 2 relevant sources, sources, most
/information (primary and latest most latest latest
collection secondary), very
old reference

3 Completion of Completed less Completed 50 to Completed 60 to Completed more


the Target as than 50% 60% 80% than 80 %
per project
proposal
4 Analysis of Data Sample Size Sufficient and Sufficient and Enough data
and small, data appropriate appropriate collected by
representation neither sample, enough sample, enough sufficient and
organized nor data generated but data generated appropriate sample
presented well not organized and which is organized size. Proper
not presented well. and presented well inferences drawn
No or poor but poor by organising and
inferences drawn inferences drawn presenting data
through tables,

14
S. Characteristic Poor Average Good Excellent
No to be assessed ( Marks 1-3 ) ( Marks 4 - 5 ) ( Marks 6 - 8 ) ( Marks 9- 10 )
.
charts and graphs.

5 Quality of Incomplete Just Well Well


Prototype/Mode fabrication/asse assembled/fabricat assembled/fabricat assembled/fabricat
l mbly. ed and parts are ed with proper ed with proper
not functioning functioning parts. functioning parts.
well. Not in proper In proper shape, In proper shape,
shape, dimensions within tolerance within tolerance
beyond tolerance dimensions and dimensions and
limit. good good
Appearance/finish finish/appearance. finish/appearance.
is shabby. But no creativity Creativity in
in design and use design and use of
of material material

6 Report Very short, poor Nearly sufficient Detailed, correct Very detailed,
Preparation quality sketches, and correct details and clear correct, clear
Details about about methods, description of description of
methods, material, methods, methods,
material, precautions and materials, materials,
precaution and conclusion, but precautions and precautions and
conclusions clarity is not there Conclusions. conclusions.
omitted, some in presentation. Sufficient Graphic Enough tables,
details are wrong But not enough Description. charts and sketches
graphic
description.

7 Presentation Major Includes major Includes major Well organized,


information is information but information and includes major
not included, not well organized well organized but information ,well
information is and not presented not presented well presented
not well well
organized .
8 Any other
(depending upon
nature of project:
please write
indicators by
pen)
Defense Could not reply Replied to Replied properly Replied most of
9 to considerable considerable to considerable the questions
number of number of number of properly
question. questions but not question.
very properly

15
MIcro-Project Evaluation Sheet

Process Assessment Product Assessment Total


Part A - Project Methodology Part B - Project individual Mark
Project (2 marks) Report/Working Model Presentation/Viva s
Proposal (2 marks) (4 marks) 10
(2 marks)

Note:
Every course teacher is expected to assign marks for group evolution for each group of students in first 3
columns as per rubrics & individual evaluation in 4TH column for each group of students as per rubrics based
on viva.

Comments/Suggestions about team work/leadership/inter-personal communication (if any)


………………………………………………………………………………………………
……………………………………………………………………………………………..
……………………………………………………………………………………………..
……………………………………………………………………………………………..

Any Other Comment:


……………………………………………………………………………………………
……………………………………………………………………………………………
……………………………………………………………………………………………
………………………………………………………………………………………………

Name and designation of the Faculty Member…………………………………….

Signature………………………………………………………………………………

Date:………………………..

16

You might also like