You are on page 1of 63

IMPLEMENTING FILTERED WALL IN ONLINE

SOCIAL NETWORKING SITE


A PROJECT REPORT
Submitted by

MANASY M
NIVEDHITHA R
RANJINI PRIYA R

(211611104076)
(211611104092)
(211611104110)

in partial fulfilment for the award of the degree


Of

BACHELOR OF ENGINEERING
IN

COMPUTER SCIENCE AND ENGINEERING

RAJALAKSHMI ENGINEERING COLLEGE


ANNA UNIVERSITY: CHENNAI 600 025
APRIL 2015
i

ANNA UNIVERSITY: CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this project report IMPLEMENTING FILTERED WALL IN


ONLINE SOCIAL NETWORKING SITE is
MANASY.M

(211611104076),

RANJINI PRIYA.R

the

NIVEDHITHA.R

bonafide work of
(211611104092),

(211611104110) who carried out the project work

under my supervision.

SIGNATURE

SIGNATURE

Dr. G. SUJITHA

Mr.DHANASEKARAN .S

HEAD OF THE DEPARTMENT

SUPERVISOR

Professor,

Assistant Professor,

Department of Computer Science and

Department of Computer Science and

Engineering,

Engineering,

Rajalakshmi Engineering College,

Rajalakshmi Engineering College,

Thandalam, Chennai - 602105.

Thandalam, Chennai - 602105.


ii

ANNA UNIVERSITY: CHENNAI 600 025

This project report is submitted for viva voice examination to


be held on ____________.

1. MANASY. M
2. NIVEDHITHA. R
3. RANJINI PRIYA.R

INTERNAL EXAMINER

(211611104076)
(211611104092)
(211611104110)

EXTERNAL EXAMINER

ACKNOWLEDGEMENT

First we thank the Almighty god for the successful completion of the project.
Our sincere thanks to our Chairman Mr. S. MEGANATHAN, B.E., F.I.E., for
his sincere endeavour in educating us in his premier institution. We would
like to express our

deep gratitude

to

our

beloved Chairperson

Dr. (Mrs.), THANGAM MEGANATHAN, Ph.D., for providing us with all


the necessary resources and other facilities towards the completion of the
project.

We also express our sincere gratitude to

our

college

Principal,

Dr. G. THANIGAIARASU, B.E., M.Sc., Ph.D., who helped us in providing


the required facilities in completing the project. We would

like to thank

Dr. G. SUJITHA, Ph.D., Head Of the Department of Computer Science and


Engineering for her encouragement for completing the project.

We would like to express our sincere appreciation and gratitude to our guide
Mr. DHANASEKARAN.S, B.Tech., M.Tech for his guidance, constant
encouragement and support. We would like to thank our Project Coordinator
Mr. S.SURESH KUMAR, M.E., (Ph.D.) and Mr.S.VINOD KUMAR,
M.Tech., for their encouragement in successful completion of this project.We
also extend our sincere thanks to all the faculty members and supporting staffs
for their direct and indirect involvement in successful completion of the project.
We express our gratitude to our parents, friends and well wishers for their
encouragement and moral support.

ii

ABSTRACT
The major issue in todays Online Social Network (OSNs) is to give the users
the ability to control the messages posted on their own private wall to avoid
unwanted messages being posted. Online Social Networking (OSNs) provides
less support to this requirement. We propose a system allowing OSN users to
have a direct control on the messages posted on their wall. The present work is
to experimentally evaluate an automated system called Filtered Wall, able to
filter unwanted messages from Online Social Network user wall. This is
achieved through a flexible system that allows users to customize the filtering
criteria to be applied to their own private wall.

iii

TABLE OF CONTENTS
CHAPTER NO

TITLE

PAGE NO.

ABSTRACT

LIST OF TABLES

LIST OF FIGURES

xi

LIST OF ABBREVIATIONS

xii

INTRODUCTION
1.1Life Cycle Model

1.1.1 Advantages

1.2 Data Mining

1.3 Online Social Networking

LITERATURE SURVEY
2.1 Literature survey

SYSTEM ANALYSIS
3.1 Existing System

10

3.1.1 Disadvantages
3.2 Proposed System

10
10

vi

SYSTEM REQUIREMENTS
4.1 Requirement Description
4.1.1 Hardware requirements

12

4.1.2 Software requirements

12

4.2 Technologies used

12

12

4.2.1 Php

12

4.2.2 WAMP Server

13

4.2.3 MYSQL

13

SYSTEM DESIGN
5.1 System Architecture

15

5.2 Data flow Diagram

16

5.3 Use case Diagram

18

5.4 Class Diagram

19

5.5 Object Diagram

20

5.6 Sequence Diagram

21

5.7 Activity Diagram

22

5.8 State chart Diagram

23

5.9 Component Diagram

24

5.10 Database Design

25
vii

5.11 Database Relationship


6

SYSTEM IMPLEMENTATION
6.1 Module Description

27

28

6.1.1 Login Authentication

28

6.1.2 Registration

28

6.1.3 Profile Generation

28

6.1.4 Accept Friend Request

29

6.1.5 Send request

29

6.1.6 Post status

29

6.1.7 Filtering Text Based On Categories

29

TESTING
7.1Introduction

30

7.2 Types of Testing

30

7.2.1 Unit Testing

30

7.2.2 Integration Testing

31

7.2.2.1Top down Integration

31

7.2.2.2 Bottom up Integration

31

7.2.3 Functional Testing

31

7.2.4 Black box Testing

31

viii

7.2.5 System Testing

32

7.3 Test Cases

33

CONCLUSION AND FUTURE WORK

34

APPENDIX I

35

APPENDIX II

47

REFERENCES

50

ix

LIST OF TABLES
NAME

TITLE

PAGE NO

Table 5.10.1

USER_DETAILS

25

Table 5.10.2

USER_PROFILE

25

Table 5.10.3

IMAGES_TBL

25

Table 5.10.4

FRND_REQ

25

Table 5.10.5

FRND

26

Table 5.10.6

POST

26

Table 5.10.7

BLOCKING

26

LIST OF FIGURES
NAME

TITLE

PAGE NO

Fig 5.1

System Architecture

15

Fig 5.2

Dataflow Diagram

16

Fig 5.3

Use case Diagram

18

Fig 5.4

Class Diagram

19

Fig 5.5

Object Diagram

20

Fig 5.6

Sequence Diagram

21

Fig 5.7

Activity Diagram

22

Fig 5.8

State chart Diagram

23

Fig 5.9

Component Diagram

24

xi

LIST OF ABBREVIATIONS
ABBREVIATION

ACRONYMS

OSN

Online Social networking

FW

Filtered Wall

OSA

Online Setup Assistant

BL

Black listing

RBFN

Radial Basis Function Networks

xii

CHAPTER 1
INTRODUCTION
1.1 LIFECYCLE MODEL
The life cycle model we have choosen for our project is AGILE MODEL. Agile
development model is also a type of Incremental model. Software is developed in
incremental, rapid cycles.
1.1.1 ADVANTAGES:
Customer satisfaction by rapid, continuous delivery of useful software.
People and interactions are emphasized rather than process and tools.
Working software is delivered frequently (weeks rather than months).
Face-to-face conversation is the best form of communication.

1.2 DATA MINING


Data mining (the analysis step of the "Knowledge Discovery and Data Mining"
process, or KDD), an interdisciplinary subfield of computer science, is the
computational process of discovering patterns in large data sets involving methods
at

the

intersection

of artificial

intelligence, machine

learning, statistics,

and database systems. The overall goal of the data mining process is to extract
information from a data set and transform it into an understandable structure for
further use. Aside from the raw analysis step, it involves database and data
management

aspects, data

pre-processing, model and inference considerations,

interestingness metrics, complexity considerations, post-processing of discovered


structures, visualization, and online updating.
The actual data mining task is the automatic or semi-automatic analysis of large
quantities of data to extract previously unknown interesting patterns such as groups
of data records (cluster analysis), unusual records (anomaly detection) and
dependencies (association rule mining). This usually involves using database
techniques such as spatial indices. These patterns can then be seen as a kind of
summary of the input data, and may be used in further analysis.
1.3 ONLINE SOCIAL NETWORK
Online Social Networks (OSNs) are one of the popular interactive medium to
communicate, share and disseminate a considerable amount of human life
information. Daily and continuous communications imply the exchange of several
types of content including free text. They provide an active support in complex and
sophisticated tasks involved in OSN management, such as access control or
information filtering. Information has been explored for what concerns textual
2

documents and, more recently, web content. The aim of this is mainly to provide
users a classification mechanism to avoid they useless data. In OSNs, information
filtering can also be used for a different, more sensitive, purpose. This is due to the
fact that in OSNs there is possibility of posting or commenting other posts on
particular public or private areas, called in general walls. Information filtering can
therefore be used to give users the ability to automatically control the messages
written on their own walls by filtering out unwanted messages. Today OSNs
provide little support to prevent unwanted messages on user walls. There is no
content-based preferences are supported and therefore it is not possible to prevent
undesired messages such as political or vulguar ones, no matter of the user who
posts them. Information filtering systems are designed to classify a stream of
dynamically generated information dispatched asynchronously by an information
producer and present to the user those information that are likely to satisfy his or
her requirements.
The aim of the present work is therefore to propose and experimentally evaluate an
automated system, called Filtered Wall (FW), able to filter unwanted messages
from OSN user walls. We exploit text categorization techniques to automatically
assign with each short text message a set of categories based on its content. The
major efforts in building a robust short text classifier are concentrated in the
extraction and selection of a set of characterizing and discriminant features. The
original set of features, derived from endogenous properties of short texts, is
enlarged here including exogenous knowledge related to the context from which
messages originate. One of the most efficient solutions in text classification is the
use of neural learning in this model. The neural model has two level classification
strategy . In the first level, the RFBN categorizes short messages as Neural and

Non-neural. In the second stage, non-neural messages are classified producing


gradual estimates of appropriateness to each of the considered category.
The system also provides a powerful layer exploiting a flexible language to specify
filtering methods, by which users can state what contents should not be displayed
on their walls. This is the first proposal of a system to filter unwanted messages
from OSN user walls on the basis of both message content and the message creator
relationships and characteristics. This is mainly based on the system providing
customizable content-based message filtering for OSN.

CHAPTER 2
LITERATURE SURVEY
2.1 LITERATURE SURVEY
1. Content-Based Book Recommending
Categorization (august 1999)

Using

Learning

for

Text

AUTHORS: Raymond J.Mooney , Loriene Roy


DESCRIPTION:
Recommender systems improve access to relevant products and information by
making personalized suggestions based on previous examples of a user's likes and
dislikes. Most existing recommender systems use social filtering methods that base
recommendations on other users' preferences. By contrast, content-based methods
use information about an item itself to make suggestions. This approach has the
advantage of being able to recommended previously unrated items to users with
unique interests and to provide explanations for its recommendations. We describe
a content-based book recommending system that utilizes information extraction
and a machine-learning algorithm for text categorization. Initial experimental
results demonstrate that this approach can produce accurate recommendations.
These experiments are based on ratings from random samplings of items and we
discuss problems with previous experiments that employ skewed samples of userselected examples to evaluate performance.
DRAWBACKS:
Users have to select productive strategies for selecting good examples
themselves.
Content based methods are best at recommending unpopular items to users
with unique tastes when sufficient other user data is unavailable.
5

2. Machine Learning in Automated Text Categorization (october 2001).


AUTHOR: Fabrizio Sebastiani
DESCRIPTION:
Automated categorization (or classication) of texts into predened categories has
witnessed a booming interest in the last ten years, due to the increased availability of
documents in digital form and the ensuing need to organize them. In the research
community the dominant approach to this problem is based on machine learning
techniques: a general inductive process automatically builds a classier by learning,
from a set of preclassied documents, the characteristics of the categories. The
advantages of this approach over the knowledge engineering approach (consisting in the
manual denition of a classier by domain experts) are a very good eectiveness,
considerable savings in terms of expert manpower, and straightforward portability to
dierent domains. This survey discusses the main approaches to text categorization that
fall within the machine learning paradigm.
DRAWBACKS:
Three dierent problems are namely document representation, classier construction,
and classier evaluation.
Indispensable in many applications in which the sheer number of the documents to be
classied and the short response time required by the application make the manual
alternative implausible.

3. Automated Learning of Decision Rules for Text Categorization (1994)


AUTHORS: Chidanand Apte, Fred Damerau, Sholom M. Weiss
DESCRIPTION:
The goal of this method is to automatically discover classification patterns that can
be used for general document categorization or personalized filtering of free text.
Previous reports indicate that human-engineered rule-based systems, requiring
many man years of developmental efforts, have been successfully built to read
documents and assign topics to them. In this paper, we show that machine
generated decision rules appear comparable to human performance, while using the
identical rule-based representation. In comparison with other machine learning
techniques, results on a key benchmark from the Reuters collection show a large
gain performance. In the context of a very high dimensional feature space, several
methodological alternatives are examined.
DRAWBACKS:
The explosive growth of electronic documents has been accompanied by an
expansion in availability of computing.It is unlikely that such information can be
managed without extensive assistance of machine.
Using dictionaries of single words does not mean that the best solution ignores
phrases and combinations of words.

4. Combining Provenance with Trust in Social Networks for Semantic Web


Content Filtering
AUTHOR: Jennifer Golbeck
DESCRIPTION:
Social networks are a popular movement on the web. On the Semantic Web, it is
simple to make trust annotations to social relationships. In this paper, we present a
two level approach to integrating trust, provenance, and annotations in Semantic
Web systems. We describe an algorithm for inferring trust relationships using
provenance information and trust annotations in Semantic Web-based social
networks. Then, we present an application, FilmTrust, that combines the computed
trust values with the provenance of other annotations to personalize the website.
The FilmTrust system uses trust to compute personalized recommended movie
ratings and to order reviews. We believe that the results obtained with FilmTrust
illustrate the success that can be achieved using this method of combining trust and
provenance on the Semantic Web.
DRAWBACKS:
We expect that people who the user trusts highly will tend to agree with the user
more about the trustworthiness of others than people who are less trusted.
Networks are dierent. Depending on the subject (or lack thereof) about which
trust is being expressed, the user community, and the design of the network, the
eect of these properties of trust can vary.

5.RCV1: A New Benchmark Collection for Text Categorization Research


(2004)
AUTHORS: David D. Lewis ,Yiming Yang,Tony G.Rose,Fan Li
DESCRIPTION:
Reuters Corpus Volume I (RCV1) is an archive of over 800,000 manually
categorized newswire stories recently made available by Reuters, Ltd. for research
purposes. Use of this data for research on text categorization requires a detailed
understanding of the real world constraints under which the data was produced.
Drawing on interviews with Reuters personnel and access to Reuters
documentation, we describe the coding policy and quality control procedures used
in producing the RCV1 data, the intended semantics of the hierarchical category
taxonomies, and the corrections necessary to remove errorful data. We refer to the
original data as RCV1-v1, and the corrected data as RCV1-v2. We benchmark
several widely used supervised learning methods on RCV1-v2, illustrating the
collections properties, suggesting new directions for research, and providing
baseline results for future studies.
DRAWBACKS:
There are gaps in the range of IDs in the original RCV1-v1, and additional gaps
(due to deleted documents) in RCV1-v2. Regrettably, the ID order does not
correspond to chronological order of the stories, even at the level of days.

The number of duplicates, foreign language documents, and other anomalies

present in RCV1 is problematic depends on the questions a researcher is using


RCV1 to study.

CHAPTER 3
SYSTEM ANALYSIS
3.1 EXISTING SYSTEM
Existing system provides little support to prevent the unwanted messages on user
walls.For example,Facebook allows users to state who is allowed to insert
messages in their walls(i.e.,friends,friends of friends,or defined groups of
friends).No content based preferences are supported and therefore it is not possible
to prevent undesired messages,such as political or vulguar ones,no matter of the
user who posts them.This is because wall messages are constituted by short text for
which traditional classification methods have serious limitations since short texts
do not provide sufficient word occurrences.
3.1.1 DISADVANTAGES
No content-based preferences are supported and therefore it is not to prevent
undesired messages, such as political or vulguar ones,no matter of the user
who posts them.
Providing this service is not only a matter of using previously defined web
content mining techniques for a different application, rather it requires to
design ad hoc classification strategies.
This is because wall messages are constituted by short text for which
traditional classification methods have serious limitations since short text do
not provide sufficient word occurrences.
3.2 PROPOSED SYSTEM
The aim of the proposed system is therefore to propose and experimentally
evaluate an automated system, called Filtered Wall (FW), able to filter unwanted
10

messages from OSN user walls. This is the basis of

both message content

characteristics.
In particular, we base the overall short text classification strategy for their proven
capabilities in acting as soft classifiers, in managing noisy data and intrinsically
vague classes. Moreover, the speed in performing the learning phase creates the
premise for an adequate use in OSN domains, as well as facilitates the
experimental evaluation tasks. Non neural messages are classified producing
gradual estimates of appropriateness to each of the considered category. Besides
classification facilities, the system provides a powerful layer exploiting a flexible
language to specify Filtering method by users can state what contents should not be
displayed on their walls. Filtering can support a variety of different filtering criteria
that can be combined and customized according to the user needs. More precisely,
Filtering methods exploit user profiles, user relationships as well as the output of
the categorization process to state the filtering criteria to be enforced.

11

CHAPTER 4
SYSTEM REQUIREMENTS
4.1 REQUIREMENTS DESCRIPTION
4.1.1 HARDWARE REQUIREMENTS
Processor

Intel Core

RAM

4 GB

Speed

1.170GHz

Monitor

SVGA

4.1.2 SOFTWARE REQUIREMENTS


Operating system :

Windows 8

Coding language :

php 5.5.12

Database

MySQL 5.6.17

4.2 TECHNOLOGIES USED


4.2.1php Hypertext Processor
php is a server-side scripting language designed for web development and
also used as a general purpose programming language. It is fast, flexible and
pragmatic. php code can be simply mixed with HTML code or it can be used in
combination with templating engines and web frameworks. php code is usually
processed by a php interpreter, which is usually implemented as a web servers
native module or a Common Gateway Interface(CGI) executable. After the PHP
code is interpreted and executed, the web server sends resulting output to its client,
12

usually in form of a part of the generated web page. php interpreters became
available on most existing 32-bit and 64-bit operating systems, either by building
them from the php source code, or by using pre-built binaries. The original, only
complete and most widely used php implementation is powered by the Zend
Engine and known simply as php. php includes various free and open-source
libraries in its source distribution or uses them in resulting php binary builts. php is
fundamentally an Internet-aware system with built-in modules for accessing File
Transfer Protocol (FTP) servers and many database servers. php can be deployed
on the most web servers, many operating systems and platforms and be used with
many relational database management systems. Most web hosting providers
support php for use by their clients. Originally designed to create dynamic web
pages, php now focuses mainly on server-side scripting languages that provide
dynamic content from a web server to a client.
4.2.2WAMP SERVER
WAMP Windows, Apache, MySQL and PHP, an application
server platform. WampServer is a Windows web development environment. It
refers to a software stack for the Microsoft Windows operating system. It consists
of Apache web server, OpenSSL for SSL support, MySQL database and PHP
programming language.
4.2.3 MYSQL DATABASE
MySQL database powers the most demanding web, Ecommerce and Online Transaction Processing applications. It is a fully integrated
transaction-safe, ACID compliant database with full commit, rollback, and crash
recovery and row level locking capabilities. MySQL delivers the ease of use,

13

scalability and performance that has made MySQL the worlds most popular open
source database.

14

CHAPTER 5
SYSTEM DESIGN
5.1 SYSTEM ARCHITECTURE

Fig 5.1 System Architecture for Implementing Filtered Wall in Online


Social Networking
The system architecture consists of two OSN users in which there can able to
send request or accept friend request through logging into their respective
accounts. And their can update their posts on their own wall or on friends wall, if
the post content is valid then it will be posted on the wall or if it is not valid then it
will not be posted on wall by checking with the blocked words in the dataset and it
filters the words which are not valid to post on the wall. By this users have a
control on the messages posted on their wall.

15

5.2 DATA FLOW DIAGRAM


A data flow diagram(DFD) is a graphical representation of the flow of data
through an information system. It differs from the flowchart as it shows the data
flow instead of the control flow of the program. A data flow diagram can also be
used for the visualization of data processing. The DFD is designed to show how a
system is divided into smaller portions and to highlight the flow of data between
those parts.
LEVEL 0:

LEVEL 1:

16

LEVEL 2:

Fig 5.2Data flow diagram of filtered wall in online social networking


17

5.2 USE CASE DIAGRAM


A use case is a method used in system analysis to identify, clarify, and
organize system requirements. It shows the relationship between the user and the
different use cases in which the user is involved. This is a graphic depiction of the
interactions among the elements of a system.

Fig 5.3 Use case diagram of filtered wall in online social networking

18

5.4 CLASS DIAGRAM:


A class diagram in the uml is a type of static structure diagram that describes the
structure of a system by showing the systems classes,their attributes, and the
relationships between the classes.

Fig 5.4 class diagram of filtered wall in online social networking


19

5.5 OBJECT DIAGRAM


An object diagram is a diagram that shows a complete or partial view of the
structure of a modeled system at a specific time. An object diagram focuses on
some particular set of object instances and attributes, and the links between the
instances.

20

Fig 5.5 object diagram of filtered wall in online social networking

5.6 SEQUENCE DIAGRAM


A sequence diagram is an interaction diagram that
shows how processes operate with one another and what is their order. It is a
construct of a message sequence chart. A sequence diagram shows object
interactions arranged in time sequence.

Fig 5.6 sequence diagram of filtered wall in online social networking

21

5.7 ACTIVITY DIAGRAM


Activity diagrams are the graphical representations of workflows of stepwise
activities and actions with support for choice, iteration and concurrency. Activity
diagrams are intended to model both computational and organizational processes.

22

Fig 5.7 Activity diagram of filtered wall in online social networking

5.8 STATE CHART DIAGRAM


A state diagram is a type of diagram used in computer science and related fields to
describe the behavior of systems. State diagrams require that the system described
is composed of a finite number of states.

23

Fig 5.8 state chart diagram of filtered wall in online social networking

5.9 COMPONENT DIAGRAM


The component diagrams main purpose is to show the structural relationships
between the components of a system. A component represented implementation
items, such as files and executables.

Fig 5.9 component diagram of filtered wall in online social networking

24

5.10 DATABASE TABLE DESIGN:


5.10.1 USER_DETAILS:
COLUMN
UID
NAME
EMAIL
PASWD
DOB
GENDER

TYPE
Int(20)
Text
Varchar(30)
Varchar(10)
Varchar(10)
Text

CONSTRAINTS
NotNull(Priamry Key)
NotNull
NotNull
NotNull
NotNull
NotNull

5.10.2 USER_PROFILE:
COLUMN
ID
UNAME
STATUS
SCHOOL
COUNTRY

TYPE
Int(100)
Varchar(100)
Text
Varchar(20)
Text

CONSTRAINTS
Not Null(Primary Key)
Not Null
NotNull
NotNull
NotNull

TYPE
INT(100)
Int(100)
Varchar(200)
Date

CONSTRAINTS
NotNull(Primary Key)
NotNull(Foreign Key)
NotNull
NotNull

5.10.3 IMAGES_TBL:
COLUMN
IMAGES_ID
UID
IMAGES_PATH
SUBMISSION_DATE

25

5.10.4 FRND_REQ:
COLUMN
ID
FROM
TO

TYPE
Int(10)
Int(10)
Int(10)

CONSTRAINTS
NotNull(Primary Key)
NotNull
NotNull

TYPE
Int(10)
Int(10)
Int(10)

CONSTRAINTS
NotNull(Primary Key)
NotNull
NotNull

TYPE
Int(10)
Text
Int(10)

CONSTRAINTS
NotNull(Primary Key)
NotNull
NotNull(Foreign Key)

TYPE
Int(10)
Varchar(100)

CONSTRAINTS
NotNull(Primary Key)
NotNull

5.10.5 FRND:
COLUMN
ID
USER_ONE
USER_TWO
5.10.6 POST:
COLUMN
ID
PST
USERID
5.10.7 BLOCKING:
COLUMN
Blockid
Blockword

26

5.11 DATABASE RELATIONSHIP :


POST:
COLUMN
ID
PST
UID

TYPE
Int(10)
text
Int(10)

FK
FK

COLUMN
IMAGES_ID

TYPE
INT(100)

UID
IMAGES_PATH

Int(100)
Varchar(200)

SUBMISSION_DA
TE

Date

FK

USER_DETAILS:
COLUMN
UID
NAME
EMAIL
PASWD
DOB
GENDER

TYPE
Int(20)
text
Varchar(30)
Varchar(10)
Varchar(10)
text

FRND:

COLUMN
ID
USER_ONE
USER_TWO

27

TYPE
Int(10)
Int(10)
Int(10)

CHAPTER 6
SYSTEM IMPLEMENTATION
6.1 MODULE DESCRIPTION:
The system consists of seven modules namely login authentication,
registration, profile generation, send friend request, accept friend request, post
status, filtering text based on categories.
6.1.1 LOGIN AUTHENTICATION:
The process of identifying an individual, usually based on a username and
password. In security systems, authentication is distinct from authorization, which
is the process of giving individuals access to system objects based on their identity.
The login form module presents visitors with a form with username and password
fields. If the user enters valid username and password then they will be granted
access to additional resources on the website
6.1.2 REGISTRATION:
The ability to create new users. New users have to give their details. It
verifies the user request and have their own account. Having their account gives
many features, including more editing options and user preferences
6.1.3 PROFILE GENERATION:
User's profile details like profile name, display picture and status are
entered by the user which gets stored in the database. Authorized users once
logged into their profile can see their details and if they wish to change any of their
information they can edit it.

28

6.1.4 ACCEPT FRIEND REQUEST:


In this module user add new friends and view their friends and
details. Logged users can see their friend list and if they wish to add friends.
6.1.5 SEND FRIEND REQUEST:
In this module user select friend to send request. logged user view
request ,accept friend request.
6.1.6 POST STATUS:
In this module user can post any photo in public wall, and any friend of
user can post comment for that photo. User can send text messages to anyone in
their friend list.
6.1.7 FILTERING TEXT BASED ON CATEGORIES:
This module manages posting comments in the user status box. Each
unwanted message has an alert that it is an unwanted message.

29

CHAPTER 7
SYSTEM TESTING
7.1 TESTING
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.
7.2 TYPES OF TESTING
7.2.1 UNIT TESTING
Unit testing involves the design of test cases that validate the internal program
logic is functioning properly, and that program input procedure valid outputs. All
decision branches and internal code flow should be validated. It is the testing of
individual software unit of the application. It is done after completion of an
individual unit before integration. This is a structural testing, that relays on
knowledge of its construction and is invasive. Unit test perform basic test at
component level and tests a specific business process, application and / or system
configuration. Unit test ensure that each unit path of a business process performs
accurately to the documented specifications, and contains clearly defined inputs
and expected results.

30

7.2.2 INTEGRATION TESTING


7.2.2.1 TOP DOWN INTEGRATION
Modules integrated by moving down the program design hierarchy. Can use depth
first or breadth first top down integration. Verifies major control and decision
points early in design process. Top-level structures are tested most. Top down
integration forced (to some extent) by some development tools in programs with
graphical user interfaces.
7.2.2.2 BOTTOM UP INTEGRATION
Begin construction and testing with atomic modules (lowest level modules).
Bottom up integration testing as its name implies begins construction and testing
with atomic modules. Because modules are integrated from the bottom up,
processing required for modules subordinate to a given level is always available
and the need for stubs is eliminated.
7.2.3 FUNCTIONAL TESTING
Functional tests provide a systematic demonstration that functions tested are
available as specified by the business and technical requirements, system
documentation and user manuals.
Organization and preparation of functional test is focused on requirements, key
functions, or special test cases. In addition, systematic coverage pertaining to
identify the business process flows: data fields, predefined process, and successive
processes must be considered for testing. Before Functional testing is complete,
additional tests are identified and the effective value of current test is determined.

31

7.2.4 BLACKBOX TESTING


Black-box testing is a method of software testing that examines the functionality of
an application without peering into its internal structures or workings. This method
of test can be applied to virtually every level of software testing: unit, integration,
system and acceptance. The goal of a black-box penetration test is to simulate an
external hacking or cyber warfare attack.
7.2.5 SYSTEM TESTING
System testing of software or hardware is testing conducted on a complete,
integrated system to evaluate the system's compliance with its specified
requirements. System testing falls within the scope of black box testing, and as
such, should require no knowledge of the inner design of the code or logic. system
testing is performed on the entire system in the context of a Functional
Requirement Specifications (FRS) and/or a System Requirement Specification
(SRS).

32

33

CHAPTER 8
CONCLUSION AND FUTURE WORK
CONCLUSION
In this work, we have presented a system to lter undesired messages from OSN
walls. The system exploits a soft classier to enforce customizable contentdependent filtering method. Moreover, the exibility of the system in terms of
ltering options is enhanced through the management of BLs.
FUTURE WORK
This work is the first step of a wider project .The early encouraging results we
have obtained on the classication procedure prompt us to continue with other
work that will aim to improve the quality of classication. In particular, future
plans contemplate a deeper investigation on two interdependent tasks. The rst
concerns the extraction and/or selection of contextual features that have been
shown to have a high discriminative power. The second task involves the learning
phase. Since the underlying domain is dynamically changing, the collection of preclassied data may not be representative in the longer term. The present batch
learning strategy, based on the preliminary collection of the entire set of labeled
data from experts, allowed an accurate experimental evaluation but needs to be
evolved to include new operational requirements. In future work, we plan to
address this problem by investigating the use of on-line learning paradigms able to
include label feedbacks from users. Additionally, we plan to enhance our system
with a more sophisticated approach to decide when a user should be inserted into a
BL.

34

APPENDIX I
CODING
MODULE 1 LOGIN AUUTHENTICATION MODULE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="st.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home</title>
</head>
<body bgcolor="#FFFFFF">
<div class="time"></div>
<?php
session_start();
$mail=$_SESSION['mail'];
$psd=$_SESSION['pasd'];
//echo $mail;
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="sharepoint"; // Database name

35

$tbl_name="images_tbl"; // Table name


$con=mysqli_connect($host, $username, $password,$db_name)or die("cannot
connect");
//echo "CONNECTED";
//echo "SELECTED";
$res=mysqli_query($con,"SELECT
`PASWD`='$psd'" );

FROM

`user_details`

WHERE

FROM

`images_tbl`

WHERE

$row=mysqli_fetch_array($res);
$a=$row["UID"];
//echo $a;
$b=mysqli_query($con,"SELECT
`images_id`=$a");

$rows=mysqli_fetch_array($b);
?>
<table width="1349" height="691" border="0">
<tr>
<td width="228" height="478">
<p><img src="<?php echo $rows["images_path"]; ?>" height=126 width="132"
align="top">
</p><h3>
<p>STUDIED IN <?php echo $_SESSION['schol']; ?></p>
<p>LIVES IN <?php echo $_SESSION['cntry']; ?></p></h3>
<hr color="#666666" width="204"/>
<div id="new">
36

<a href="try1.php">
<p><img src="wall.png" width="33" height="28" />Wall</p></a>
<a href="editprofile.php"><p><img src="edit.png" width="34" height="28" />Edit
Profile</p></a>
<a href="friends-list.php"><img
/>Friends</a>

src="frnd.jpg"

width="33"

height="28"

<a href="request.php">
<p><img src="req.png" width="33" height="28"/>Request</p></a>
<a href="members.php">
<p><img src="mem.png" width="33" height="28" />Members</p></a>
<a href="profile1.php"><p><img
/>Profile</p>

src="prof.jpg"

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</a>
</td>
</div>
<td width="1099">
<div id="top"><h2>
<p class="uppercase">SHARE POINT</h2>
37

width="39"

height="33"

<a href="try1.php"><img src="home.jpg" width="42" height="40">Home</a>


<a
href="profile.php"><img
/>RecentlyPosted </a>

src="post.png"

width="42"

height="40"

<a
href="logout.php"><img
/>Logout</a>

src="logout.jpg"

width="42"

height="40"

</p></div>
<hr size="20" noshade width="1100"/>
<p class="uppercase"> WELCOME
<?php

echo $_SESSION['profn'];
?>
<form name="form1" method="post" action="insrtpost.php">
<p>
<label for="post"></label>
<textarea name="post" id="post" cols="40" rows="3"></textarea>
<input name="submit" type="submit" value="Post" />
</p>
</form>
<hr noshade="noshade" />
<h3>Recent Posts:</h3>
<p>
<?php

38

$host="localhost"; // Host name


$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="sharepoint"; // Database name
$currentid=$_SESSION['MY_ID'];
$con=mysqli_connect($host, $username, $password,$db_name)or die("cannot
connect");
$quer=mysqli_query($con,"SELECT * FROM `post` ORDER BY `Id` DESC");
while($run_quer=mysqli_fetch_array($quer))
{
$txt=$run_quer["Pst"];
$_SESSION['msg']=$txt;
$usrid=$run_quer["Userid"];
if($currentid!=$usrid )
{
$query=mysqli_query($con,"SELECT `user_one`, `user_two` FROM `frnd`
WHERE `user_one`='$currentid' OR `user_two`='$currentid' ");
while($run_frnd=mysqli_fetch_array($query))
{
$user_one=$run_frnd['user_one'];
$user_two=$run_frnd['user_two'];
if($user_one==$currentid)
{

39

$user=$user_two;
}
else
{
$user=$user_one;
}
if($usrid==$user)
{
$querry=mysqli_query($con,"SELECT
UID='$user'");

FROM

user_details

WHERE

$run=mysqli_fetch_array($querry);
$uname=$run["NAME"];
$res=mysqli_query($con,"select * from images_tbl WHERE images_id='$user' " );
$runres=mysqli_fetch_array($res);
$pth=$runres["images_path"];?>
<img src="<?php echo $runres["images_path"]; ?>" height="50" width="50">
<?php
echo "Posted By::$uname::";
echo "<h4 class='box' style='display:block'> $txt </h4>";
echo "<br>";
}
}
}
40

?>
</td>
</tr>
</table>
</body>
</html>
MODULE 2: POST STATUS MODULE
<?php
session_start();
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="sharepoint"; // Database name
// Connect to server and select databse.
$con=mysqli_connect($host, $username, $password,$db_name)or die("cannot
connect");
$messages =$_POST['post'];
//$text=$_POST['post'];
$_SESSION['txt']=$messages;
$currentid=$_SESSION['MY_ID'];

41

$removeword1 = array();
$query = "Select * from `blocking`";
$result = mysqli_query($con,$query);
while($removeword = mysqli_fetch_array($result))
{
array_push($removeword1, $removeword['Blockword']);
//print_r($removeword1);
}
$removearrlen=count($removeword1);
for($x=0;$x<$removearrlen;$x++)
{
//echo $removeword1[$x];
}
////$removeword=array("terror","militory","kill","murder","rape");
$chkstr= $messages;
$removearrlen=count($removeword1);
$chkarr=explode(" ",$chkstr);
$arrlen=count($chkarr);
$chkval=0;
42

$stopval=0;
for($x=0;$x<$removearrlen;$x++)
{
for($y=0;$y<$arrlen;$y++)
{
if($removeword1[$x]==$chkarr[$y])
{
$chkval+=1;
}
else
{

$stopval+=1;

}
}
}
if ($chkval>0)
{
header('location:dispmsg.php');
}
else
43

{
echo "great";
$query=mysqli_query($con,"INSERT

INTO

`post`

VALUES

('','$messages','$currentid')");
header('location:postfrndwall1.php');
}
?
MODULE 3:FILTERING TEXT BASED ON CATEGORIES
<?php
session_start();
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="sharepoint"; // Database name
// Connect to server and select databse.
$con=mysqli_connect($host, $username, $password,$db_name)or die("cannot
connect");
$messages =$_POST['post'];
//$text=$_POST['post'];
$_SESSION['txt']=$messages;
$currentid=$_SESSION['MY_ID'];
$removeword1 = array();
44

$query = "Select * from `blocking`";


$result = mysqli_query($con,$query);
while($removeword = mysqli_fetch_array($result))
{
array_push($removeword1, $removeword['Blockword']);
//print_r($removeword1);
}
$removearrlen=count($removeword1);
for($x=0;$x<$removearrlen;$x++)
{
//echo $removeword1[$x];
}
////$removeword=array("terror","militory","kill","murder","rape");
$chkstr= $messages;
$removearrlen=count($removeword1);
$chkarr=explode(" ",$chkstr);
$arrlen=count($chkarr);
$chkval=0;
$stopval=0;
for($x=0;$x<$removearrlen;$x++)
{
for($y=0;$y<$arrlen;$y++)
{
45

if($removeword1[$x]==$chkarr[$y])
{
$chkval+=1;
}
else
{

$stopval+=1;

}
}
}
if ($chkval>0)
{
header('location:dispmsg.php');
}
else
{
echo "great";
$query=mysqli_query($con,"INSERT
('','$messages','$currentid')");

INTO

header('location:postfrndwall1.php');
}?>

46

`post`

VALUES

APPENDIX II
SNAPSHOTS

Result of post status module

Snapshot ofTable based on categorization of filtered words


47

Snapshot of user profile

Snapshot of table containing user details

48

Snapshot of posting on friends wall

Snapshot of alert message due to filtering

49

REFERENCES
[1] R.J. Mooney and L. Roy, "Content-Based Book Recommending Using
Learning for Text Categorization," Proc. Fifth ACM Conf. Digital Libraries, pp.
195-204, 2000.
[2] F. Sebastiani, "Machine Learning in Automated Text Categorization," ACM
Computing Surveys, vol. 34, no. 1, pp. 1-47, 2002.
[3] C. Apte, F. Damerau, S.M. Weiss, D. Sholom, and M. Weiss, "Automated
Learning of Decision Rules for Text Categorization," Trans. Information Systems,
vol. 12, no. 3, pp. 233-251, 1994.
[4] J. Golbeck, "Combining Provenance with Trust in Social Networks for
Semantic Web Content Filtering," Proc. Int'l Conf. Provenance and Annotation of
Data, L. Moreau and I. Foster, eds., pp. 101-108, 2006.
[5] D.D. Lewis, Y. Yang, T.G. Rose, and F. Li, "Rcv1: A New Benchmark
Collection for Text Categorization Research," J. Machine Learning Research, vol.
5, pp. 361-397, 2004.
REFERENCE WEBSITES:
www.w3schools.com
www.php.net

50

You might also like