Final Project

You might also like

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

1

PRODUCTS PRICE COMPARISON


AMONG E-COMMERCE SITES

ABHISHEK KUMAR
194708894
MCSP-060

Under Guidance of

Mr. Jayesh Solanki Associate Professor and Head LD Arts College,


Gujarat University

Submitted to the School of Computer and Information Sciences, IGNOU in


partial fulfillment of the requirements for the award of the degree of

Master of Computer Applications


(MCA)
2024

Indira Gandhi National Open University


Maidan Garhi
2

CERTIFICATE OF AUTHENTICATED WORK

This is to certify that the project report entitled Product Price Comparison
among E-Commerce Sites submitted to Indira Gandhi National Open University
in partial fulfillment of the requirement for the award of the degree of MASTER
OF COMPUTER APPLICATIONS (MCA) is an authentic and original work
carried out by Mr. Abhishek Kumar with enrolment no. 194708894 under my
guidance.

The matter embodied in this project is genuine work done by the student and
has not been submitted whether to this University or to any other University /
Institute for the fulfillment of the requirements of any course of study.

………………………. ...…………………….
Signature of the Student: Signature of the Counsellor

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

Name and Address Name, Designation


of the student and Address of the Counsellor:

Abhishek Kumar ………………………..


N-84/3 Amar Market ………………………..
Sourabh Vihar, Jaitpur ………………………..
Badarpur, New Delhi-110044
………………………..
Enrolment No: 194708894
3

ROLES AND RESPONSIBILITIES FORM

Name of the Project: Products Price Comparison among E-Commerce Sites.

Date:

Name of the Team Role Tasks and Responsibilities


Member

Analysis To determine the requirements from


the user, analyzing it’s feasibility in
Abhishek Kumar
terms of availability of technology,
cost benefit analysis and futuristic
approach.

Design and To design and code with proper


Coding remarks, comments following laid
down standardization criteria’s.

Testing To test the application to match all


user requirements projected during
requirement analysis, expected
exception and its handling
mechanism.

Name and Signature of the Project Team members:

1 Abhishek Kumar Signature :………………………

Signature of the Counsellor:…………………..…… Date:


4

Acknowledgement

We are pleased to present “Products Price Comparison among E-

Commerce Sites” project and take this opportunity to express our profound

gratitude to all those people who helped us in completion of this project.

We thank our college for providing us with excellent facilities that helped us

to complete and present this project. We express our deepest gratitude towards our

project guide for his/her valuable and timely advice during the various phases in

our project. We would also like to thank him/her for providing us with all proper

facilities and support as the project co-coordinator. We would like to thank him/her

for support, patience and faith in our capabilities and for giving us flexibility in

terms of working and reporting schedules.

We would like to thank all our friends for their smiles and friendship making

the college life enjoyable and memorable and family members who always stood

beside us and provided the utmost important moral support. Finally, we would like

to thank everyone who has helped us directly or indirectly in our project.


5

PROJECT SYNOPSIS
6

PROJECT REPORT
7

TABLE OF CONTENT
Sr. No. Contents

1 PROJECT OVERVIEW
8
1.1 Introduction
1.2 Objective, Purpose and Scope

2 SYSTEM ANALYSIS
2.1 Identification of the Need
2.2 Preliminary Investigation
2.3 Feasibility Study.
2.4 Project Planning and Scheduling
PERT Chart
Gantt Chart
Flow Graph
2.5 Software, Hardware and Tools Requirement
2.6 Survey of Technologies used.

3 PROJECT DESIGN
3.1 Project Life Cycle Details
3.2 ER-Diagram
3.3 Use Case Diagram
3.4 Sequence Diagram
3.5 Activity Diagram
3.6 Class Diagram
3.7 DFD
3.8 System Architecture
3.9 Data Dictionary

4 CODING

5 STANDARDISATION OF CODING
5.1 Code Efficiency
5.2 Error Handling
5.3 Parameter Calling and Passing
5.4 Validation check
5.5 Coding Standards

6 TESTING
6.1 Unit Testing
6.2 Integration Testing
6.3 Validation Testing
6.4 Output Testing
6.5 User Acceptance Testing
6.6 Test Cases

7 REPORT AND SCREENSHOTS

8. FUTURE SCOPE OF THE APPLICATION


9

1. PROJECT OVERVIEW.

1.1 Introduction.

Price comparison websites are becoming more popular since


E-Commerce revolution. The data and values provide by the price
comparison sites helps consumers to save money while shopping online. The
ability to check the price of products brings convenience and saves a lot of
time. Price comparison is done when the price of the same product is
compared in different outlets. There are many online shopping sites which
are being used to shop various products online. A particular product has
different prices on every different shopping site. We need to check manually
the price of the product on every site, which causes inconvenience and
consumes a lot of time.

There are many price comparisons sites which provide products


comparison, but there is no site which compares the price of wish list
products. Hence, we have proposed a project named Wish list Products Price
comparison website which compares the prices of products from intended
sites which user intents to buy. This price comparison website for
products will help to compare the price from various e-commerce
websites. This system has an advance feature of auto login into your
websites account and process your purchase (lowest price item) followed
by placing the order on your behalf subject to submission of OTP sent
to you on your E-Mail/ Registered Mobile No.
10

1.2 Objective, Purpose, and Scope.

1.2.1 Objectives. Now people like doing online shopping.


There are many different shopping sites having different prices. Price
comparison is done when the price of the same product is compared in
different outlets. There are many online shopping sites which are
being used to shop various products online. This system has an
advance feature of sending notification when the price changes of a
particular product which has been added in the wish list. This Price
comparison site is extremely helpful for frequent online shoppers to
check prices on different online stores in one place. This system will
show you the product prices from different retailers to show you
where to buy the product at affordable price.

1.2.2 Purpose. Now people like doing online shopping. There are
many different shopping sites having different prices. Price
comparison is done when the price of the same product is compared
in different outlets. There are many online shopping sites which are
being used to shop various products online. It is a very time
consuming process to visit on every site, select your desired product,
compare the specification and then further check prices at different
sites. To ease this lengthy process, this project will required to select
the desired product at once on as many sites you want to explore then
the rest processes from finding the lowest price till placing the order
will get automated.
11

1.2.3 Scope. This price comparison website for products will


help to compare the price from various e-commerce websites, This
Price comparison site is extremely helpful for frequent online
shoppers to check prices on different online stores in one place, This
system will show you the product prices from different retailers to
show you where to buy the product at affordable price, Any three
static websites classes are analyzed to get the pricing details, To
get the pricing details, the system visits the websites based on
user’s search and downloads the html search page of that specific
website, Once prices from both the websites are retrieved, the
item having lowest price is automatically added to your Shopping
Cart of the respective website. Further, you will be automatically
logged in to that site and your order will be placed subject to
submission of final OTP by the user.
12

2. SYSTEM ANALYSIS.

2.1 Identification of the Need.

 In this day and age, when in need of a product, the majority of


buyers do some online research before making a purchase. One of
the major things they consider is the price.

 There are many online shopping sites which are being used to shop
various products online and with different prices.

 While purchasing any product people go and look for the same
product on different sites manually, then compare price and
purchase from cheap price site.

2.2 Preliminary Investigation and Feasibility Study.

2.2.1 Problem with the current scenario.

In this day and age, when in need of a product, the majority of


buyers do some online research before making a purchase. One of the
major things they consider is the price.There are many online
shopping sites which are being used to shop various products online
and with different prices. While purchasing any product people go and
look for the same product on different sites manually, then compare
price and purchase from cheap price site. This make the entire process
13

very time consuming and sometimes results in selection of wrong


delivery address and mode of payment.

2.2.2 Drawbacks of the existing system.

 There is a possibility for getting inaccurate results.


 User friendliness is very less.
 It consumes more time for processing the task.

2.2.3 Proposed System.

 Considering the anomalies in the existing system computerization


of the whole activity is being suggested after initial analysis.
 Proposed system is accessed by one entity namely, User.
 This price comparison website for wish list products will help to
compare the price from various e-commerce websites.
 This system will show you the product prices from different
retailers to show you where to buy the product at affordable price.
 Any three static websites classes are analysed to get the pricing
details.
 To get the pricing details, the system visits the website based on
user’s search and downloads the html search page of that specific
website.
 Once prices from both the websites are retrieved, The user is
logged in into its site having lowest price and order is placed after
confirmation from the user.
14

2.3 Feasibility Study.

 Technical Feasibility

In this step, we verify whether the proposed systems are


technically feasible or not. i.e., all the technologies required to
develop the system are available readily or not. Technical Feasibility
determines whether the organization has the technology and skills
necessary to carry out the project and how this should be obtained.
The system can be feasible because all necessary technology exists to
develop the system. This system is too flexible and it can be expanded
further. This system can give instant response to inquire. Our project
is technically feasible because, all the technology needed for our
project is readily available.

Operating System : Windows 7 or higher

Languages : python

Database System : My SQL 5.6

Documentation Tool : MS – Word

Internet Connection : Easily available.

Selenium : Can be easily imported in Python.

Expert level to operate the project : Basic internet Browsing.


15

 Economic Feasibility

Economically, this project is completely feasible because it


requires no extra financial investment and with respect to time, it’s
completely possible to complete this project in 6 months. In this step,
we verify which proposal is more economical. We compare the
financial benefits of the new system with the investment. The new
system is economically feasible only when the financial benefits are
more than the investments and expenditure. Economic Feasibility
determines whether the project goal can be within the resource limits
allocated to it or not. It must determine whether it is worthwhile to
process with the entire project or whether the benefits obtained from
the new system are not worth the costs. Financial benefits must be
equal or exceed the costs. In this issue, we should consider:

 The cost to conduct a full system investigation.


 The cost of h/w and s/w for the class of application being
considered.
 The development tool.
 The cost of maintenance etc.

Our project is economically feasible because the cost of


development is very minimal when compared to financial benefits of
the application.
16

 Operational Feasibility

In this step, we verify different operational factors of the


proposed systems like man-power, time etc., whichever solution uses
less operational resources, is the best operationally feasible solution.
The solution should also be operationally possible to implement.
Operational Feasibility determines if the proposed system satisfied
user objectives could be fitted into the current system operation.

 The methods of processing and presentation are completely


accepted by the clients since they can meet all user requirements.
 The clients have been involved in the planning and development of
the system.

The proposed system will not cause any problem under any
circumstances. This project is operationally feasible because the time
requirements and personnel requirements are satisfied.
17

2.4 Project Planning and Scheduling.

2.4.1 Objective. The proposed system should be able to open the E-


commerce sites (three in this case), fetch the product descriptions like
name, price, availability and specification. Further the system shall
compare the prices from different site and place the order on user’s
behalf subject to approval from the user. The system shall fully
automate the selection of lowest price site till placement of order. Due
to full automation of the project, the user will not require to
implement any external database for the project.

2.4.2 Activities. The activities and milestones included in the


project are as follows:-

(a) User will submit the details of sites to be used.

(b) User will specify the items to be procured.

(c) The code shall run and fetch the item description,
availability and price of the specified item on each mentioned
site and inform the user bout the lowest price and its
corresponding site.

(d) The user will be asked for username and password and
then the system will automatically add the item with lowest
price into the cart and process the order.
18

2.4.3 Project Scheduling.

PERT CHART

A PERT chart, also known as a PERT diagram, is a tool used to schedule,


organize, and map out tasks within a project. PERT stands for program
evaluation and review technique. It provides a visual representation of a project's
timeline and breaks down individual tasks.

TASKS W1 W2 W3 W4 W5 W6 W7 W8 W9
Project Requirement
Available Technology
Uses Cases Finalisation
Milestone
Coding
Testing Platform
Testing
Milestone
Recoding
Standardization of Code
Documentation
Milestone

Note:
Available Technology : One month was invested in learning the technology.
19

Flow Graph

M1 M2

M3 M4 M5

M6
End M7

M1: User Identification Module


M2: Module to convert price) into integer (No Special Symbol) Form
M3: Module for Fetching Data from Site One
M4: Module for Fetching Data from Site two
M5: Module for Fetching Data from Site three
M6: Module for comparing price from all websites
M7: Module for adding item into cart and Placing the Order
20

GANTT Chart

A Gantt chart is a project management tool that illustrates work


completed over a period of time in relation to the time planned for the work. It
typically includes two sections: the left side outlines a list of tasks, while the right
side has a timeline with schedule bars that visualize work.

Dec Jan Feb Mar


Requirement Gathering
Feasibility Analysis
Technical Analysis
Study of Technology
Coding
Testing
Documentation

Note: The Project has been coded using python and selenium, so a lot of time was
spent if finalizing the backend software and front end. Django and Selenium was
two candidates and later selenium was selected due to its rich inbuilt library and
less time complexity.

Testing of the code was done parallel using dummy sites available as open and
free source. Later the tested code were run on the real time E-Commerce Sites.
21

2.5 Software, Hardware and Tools Requirement.

Hardware Requirement.

(a) Laptop or PC
(b) I3 processor system or higher
(c) 4 GB RAM or higher
(d) 100 GB ROM or higher

Software Requirement.

(a) Laptop or PC
(b) Windows 7 or higher
(c) XAMP or WAMP Server
(d) Python
(e) Django/Selenium Framework
(f) MySql Database
(g) Text Editor (Notepad++ / Sublime Text)

Interface Requirements.

(a) Easy to follow interface


(b) Limited Graphics
22

2.6 Overview of Technologies used (Python).

Introduction Python is a powerful multi-purpose programming


language created by Guido van Rossum. It has simple easy-to-use
syntax, making it the perfect language for someone trying to learn
computer programming for the first time. This is a comprehensive
guide on how to get started in Python, why you should learn it and
how you can learn it. However, if your knowledge of other
programming languages and want to quickly get started with Python.
Python is a general-purpose language. It has wide range of
applications from Web development (like: Django and Bottle),
scientific and mathematical computing (Orange, SymPy, NumPy) to
desktop graphical user Interfaces (Pygame, Panda3D). The syntax of
the language is clean and length of the code is relatively short. It's fun
to work in Python because it allows you to think about the problem
rather than focusing on the syntax.

Features of Python Programming.

 A simple language which is easier to learn


Python has a very simple and elegant syntax. It's much easier to read
and write Python programs compared to other languages like: C++,
Java, C#. Python makes programming fun and allows you to focus on
the solution rather than syntax. If you are a newbie, it's a great choice
to start your journey with Python.
23

 Free and open-source.

You can freely use and distribute Python, even for commercial use.
Not only can you use and distribute software’s written in it, you
can even make changes to the Python's source code.
Python has a large community constantly improving it in each
iteration.

 Portability.

You can move Python programs from one platform to another, and
run it without any changes. It runs seamlessly on almost all
platforms including Windows, Mac OS X and Linux.

 Extensible and Embeddable.

Suppose an application requires high performance. You can easily


combine pieces of C/C++ or other languages with Python code.
This will give your application high performance as well as
scripting capabilities which other languages may not provide out of
the box.

 A high-level, interpreted language.

Unlike C/C++, you don't have to worry about daunting tasks like
memory management, garbage collection and so on.
Likewise, when you run Python code, it automatically converts
your code to the language your computer understands. You don't
need to worry about any lower-level operations.
24

 Large standard libraries to solve common tasks.

Python has a number of standard libraries which makes life of a


programmer much easier since you don't have to write all the code
yourself. For example: Need to connect MySQL database on a
Web server? You can use MySQLdb library using import
MySQLdb. Standard libraries in Python are well tested and used
by hundreds of people. So, you can be sure that it won't break your
application.

 Object-oriented.

Everything in Python is an object. Object oriented programming


(OOP) helps you solve a complex problem intuitively.
With OOP, you are able to divide these complex problems into
smaller sets by creating objects.
25

3. Project Design.

Project Lifecycle Details

Waterfall Model

Description: The waterfall Model is a linear sequential flow. In which progress


is seen as flowing steadily downwards (like a waterfall) through the phases of
software implementation. This means that any phase in the development process
begins only if the previous phase is complete. The waterfall approach does not
define the process to go back to the previous phase to handle changes in
requirement. The waterfall approach is the earliest approach that was used for
software development.
26

3.2 E-R Diagram

Gender Name

Address

Mobile No.
Register

Email id

User id

Password
has

User Wish list


access
Login Products Price

Search Product

Password
id Price Compared

Add Wish list


27

3.3 Use Case Diagram

LOGIN

SEARCH
PRODUCT

PRICE
COMPARE

ADD WISHLIST

PLACE ORDER

LOGOUT

Fig. Use Case Diagram of User


28

3.4 Sequence Diagram

17. Ask 18. Order placed()


user

19. Acknowledge ()
19. Successful

20. Successful

21. Successful

Fig. Sequence Diagram of User


29

3.5 Activity Diagram

Start the Application


Exit

Login

If authentication
is successful Order
placed.

User
approval

Exit

Fetch product details


from three sites

Item added
to cart

Price
Fetch data
Compared

Fig. Activity Diagram of User


30

3.6 Class Diagram

New Registration
User
- Name : String
- User_id : String - DOB : Int
- Password : String - Gender : String
- Address : String
+ Login()
- Mobile No.: Int
+ btn_Click ()
- Email id : String
+ Logout ()
- User id : String
- Password : String

+ Submit ()
+ btn_Click ()
31

3.7 Data Flow Diagram (DFD’s)

A data flow diagram is graphical tool used to describe and analyze


movement of data through a system. These are the central tool and the
basis from which the other components are developed. The
transformation of data from input to output, through processed, may be
described logically and independently of physical components associated
with the system. These are known as the logical data flow diagrams. The
physical data flow diagrams show the actual implements and movement of
data between people, departments and workstations. A full description of
a system actually consists of a set of data flow diagrams. Using two familiar
notations Yourdon, Gane and Sarson notation develops the data flow
diagrams.

Each component in a DFD is labeled with a descriptive name.


Process is further identified with a number that will be used for
identification purpose. The development of DFD’s is done in several levels.
Each process in lower level diagrams can be broken down into a more
detailed DFD in the next level. The lop-level diagram is often called context
diagram. It consists a single process bit, which plays vital role in studying
the current system. The process in the context level diagram is exploded
into other process at the first level DFD.
32

Data Flow Diagrams (DFD’s)

1.0
Process Invalid Password
User
Req
uest
Username and password
Product and sites detail
Product and sites detail Product X Path
0.0 User need

User 1.1
Product Price E-commerce
Comparison
Website Project DB Sites
Feedback For
Process Sites
User Data
Lowest Product price Product prices and
with site Detail
Lowest Product price with site Detail Description
Product prices and
1.2 Description
Place the Order
User Process
Req
uest
Consent, user-id and
Password for the site

DATABASE DETAIL
33

LEVEL 1 DFD

3.8 System Architecture

Place order
34

3.9 Data Dictionary. A data dictionary can be defined as a collection


of metadata such as object name, data type, size, classification, and
relationships with other data assets. A data dictionary acts as a
reference guide on a dataset. Sample data dictionary for a price
comparison website includes:

(a) Product Table.

ProductID (Primary Int Unique identifier for each


Key) product.
ProductName varchar Name of the product.
Brand varchar Name of the Site
Description varChar Description of product.
ImageURL URL to the image.

(b) User Table structure.

user_id (PK) int Id of the user


user_name varchar Enter the name of the user
user_password varchar Enter the password of the user
User_Mobile varchar Enter the Mobile No of the user
User_Address varchar Enter the Address of the user

(c) Validation Criteria.

1. In each form, no field which is not null able should be left blank.
2. All numeric fields should be checked for non-numeric values.
3. Text fields like names should not contain any numeric characters.
4. All primary keys should be automatically generated to prevent the
user from entering any existing key.
5. Use of error handling for each Save, Edit, delete and other
important operations.
6. Whenever the user Tabs out or Enter from a text box, the data
should be validated and if it is invalid, focus should again be sent to
the text box with proper message.
35

(j) Functions Description.

Login () Ask for Credentials.


Validation () Validate credentials with database.
Search () Search for particular product.
Acknowledge () Acknowledge the matching of data with inputs
during password validation and product search.
Wish list () To add items for price comparison.
Add to Cart() To add item in the Cart()
Conversion() Convert price into integer.
Logout () End of session and returning back to homepage.

(k) Business Constraints.

ProductID Each product has unique ID.


ProductName Name of the products can be same.
BrandID Each Brand has a unique ID.
Image Support JPG, JPEG and PNG.
Retailer Each Retailer will have a unique ID.
Currency Currency will be in Rupees only.
36

4. Coding.

# IMPORTING LIBRARIES AND LOADING DRIVERS

from selenium import webdriver

from selenium.webdriver.common.by import By

from selenium.webdriver.chrome.options import Options

from selenium.webdriver.support import wait

import time

options=Options()

options.add_experimental_option("detach", True)

driver = webdriver.Chrome(options=options)

# FUNCTION TO CONVERT STRING INTO PRICE OF THE ITEM

def extract_price(text):
price_str = ""
text_split = text.split(".")
for char in text_split[0]:
try:
int(char)
price_str += char
except Exception as e:
continue
return int(price_str)
37

# FETCHING THE DETAILS OF ITEMS FROM FLIPKART

# Locating the item from the Flipkart Site.

driver.get('https://www.flipkart.com/apple-iphone-12 black 256


gb/p/itm68421fa1c1121?
pid=MOBFWBYZ7CR9FRHZ&lid=LSTMOBFWBYZ7CR9FRHZNVRHNR&m
arketplace=FLIPKART&q=iphone12&store=tyy
%2F4io&srno=s_1_1&otracker=search&otracker1=search&fm=organic&iid=a421
f941-aad1-48f3-b6f6-
07475d4ce4f8.MOBFWBYZ7CR9FRHZ.SEARCH&ppt=hp&ppn=homepage&ssi
d=hqatg1buds0000001709962435415&qH=ad588135f239b88b')

# Fetching the item from the Flipkart Site.

flipkart_item_name=driver.find_element(By.XPATH,
"/html/body/div[1]/div/div[3]/div[1]/div[2]/div[2]/div/div[1]/h1/span").text

flipkart_item_cost=driver.find_element(By.XPATH,
"/html/body/div[1]/div/div[3]/div[1]/div[2]/div[2]/div/div[4]/div[1]/div/
div[1]").text

flipkart_price = extract_price(flipkart_item_cost)

flipkart_item_description=driver.find_element(By.XPATH,
"/html/body/div[1]/div/div[3]/div[1]/div[2]/div[8]/div[1]/div/div[2]").text
38

# Printing the item’s values from the Flipkart Site.

print('The cost of', flipkart_item_name, 'on flipkart is :', flipkart_price)

print('the description of the item is :')

print(flipkart_item_description)

# FETCHING THE DETAILS OF ITEMS FROM GADGETSNOW

# Locating the item from the Flipkart Site.

driver.get('https://shop.gadgetsnow.com/smartphones/apple-iphone-12-256-gb-
black-4-gb-ram-/10021/p_G201794?
gad_source=1&gclid=EAIaIQobChMI7qbuw8zmhAMVe6tmAh3FjgmEEAQYAi
ABEgLWwfD_BwE')

# Fetching the item from the GadgetsNow Site.

gadgetnow_item_name=driver.find_element(By.XPATH,
"/html/body/div[1]/div[2]/div[5]/div[1]/div/div[1]/div[1]/h1").text

gadgetnow_item_cost=driver.find_element(By.XPATH,
"/html/body/div[1]/div[2]/div[5]/div[1]/div/div[1]/div[2]/div[1]/span[1]").text

gadgetnow_price = extract_price(gadgetnow_item_cost)

gadgetnow_item_description=driver.find_element(By.XPATH,
"/html/body/div[1]/div[2]/div[5]/div[1]/div/div[3]/div[2]/div[1]/div[3]").text
39

# Printing the item’s values from the GadgetsNow Site.

print('The cost of', gadgetnow_item_name, 'on gadget now is :', gadgetnow_price)

print('the description of the item is :')

print(gadgetnow_item_description)

# FETCHING THE DETAILS OF ITEMS FROM SANGEETHA MOBILES

driver.get('https://www.sangeethamobiles.com/product-details/iPhone-12-256GB-
Black-Apple/8510?utm_source=google&utm_campaign=Apple-PerformanceMax-
Mobile-
Scaling&gad_source=1&gclid=EAIaIQobChMIpJP38c7mhAMVE6dmAh0WBQL
SEAQYASABEgIbPvD_BwE')

# Fetching the item from the Sangeetha Mobile Site.

sangeeta_item_name=driver.find_element(By.XPATH,
"/html/body/div/div/div[2]/div/div[1]/div/div[2]/div[1]/div/div[2]/h1").text

sangeeta_item_cost=driver.find_element(By.XPATH,
"/html/body/div/div/div[2]/div/div[1]/div/div[2]/div[1]/div/div[2]/div[3]/div[1]/
div[1]").text

sangeeta_price = extract_price(sangeeta_item_cost)
40

sangeeta_item_description=driver.find_element(By.XPATH,
"/html/body/div/div/div[2]/div/div[1]/div/div[2]/div[12]").text

# Printing the item’s values from the GadgetsNow Site.

print('The cost of', sangeeta_item_name, 'on Sangeeta is :', sangeeta_price)

print('the description of the item is :')

print(sangeeta_item_description)

# CODE TO FIND THE SITE PROVIDING MINIMUM COST IF

FLIPKART PRICE IS LOWEST

if flipkart_price < gadgetnow_price:

if flipkart_price < sangeeta_price:

print('Flipkart has lowest value')

time.sleep(3)

driver.get('https://www.flipkart.com/apple-iphone-12-black-256-gb/p/
itm68421fa1c1121?
pid=MOBFWBYZ7CR9FRHZ&lid=LSTMOBFWBYZ7CR9FRHZNVRHN
R&marketplace=FLIPKART&q=iphone12&store=tyy
%2F4io&srno=s_1_1&otracker=search&otracker1=search&fm=organic&iid=
a421f941-aad1-48f3-b6f6-
41

07475d4ce4f8.MOBFWBYZ7CR9FRHZ.SEARCH&ppt=hp&ppn=homepage
&ssid=hqatg1buds0000001709962435415&qH=ad588135f239b88b')

time.sleep(3)

driver.find_element(By.XPATH,
"/html/body/div[1]/div/div[3]/div[1]/div[1]/div[2]/div/ul/li[1]/button").click()

time.sleep(2)

driver.find_element(By.XPATH,
"/html/body/div[1]/div/div[2]/div/div[1]/div[1]/div/div[3]/div/form/
button").click()

time.sleep(2)

driver.find_element(By.XPATH,
"/html/body/div/div/div[2]/div/div[1]/div[1]/div/div/div/div/div[1]/div/form/
div[1]/input").send_keys("shlok.abhishek127@gmail.com")

time.sleep(2)

driver.find_element(By.XPATH,
"/html/body/div/div/div[2]/div/div[1]/div[1]/div/div/div/div/div[1]/div/form/
div[3]/button").click()

# CODE TO LOGIN AND PLACING AN ORDER IN DUMMY SITE

# Tracing the site location.

driver.get('https://www.saucedemo.com/inventory.html')

time.sleep(3)
42

# Logging in into the site with Username and Password.

driver.find_element(By.XPATH,
"/html/body/div/div/div[2]/div[1]/div/div/form/div[1]/input").send_keys('standard_
user')

driver.find_element(By.XPATH,
"/html/body/div/div/div[2]/div[1]/div/div/form/div[2]/input").send_keys('secret_sa
uce'

driver.find_element(By.XPATH,
"/html/body/div/div/div[2]/div[1]/div/div/form/input").click()

time.sleep(3)

# Adding the element into Cart.

driver.find_element(By.XPATH,
"/html/body/div/div/div/div[2]/div/div/div/div[1]/div[2]/div[2]/button").click()

time.sleep(3)

driver.find_element(By.XPATH,
"/html/body/div/div/div/div[1]/div[1]/div[3]/a").click()
time.sleep(3)

driver.find_element(By.XPATH,
"//html/body/div/div/div/div[2]/div/div[2]/button[2]").click()
43

# Submitting the Detail of Buyer.

driver.find_element(By.XPATH,
"/html/body/div/div/div/div[2]/div/form/div[1]/div[1]/input").send_keys("Abhishe
k")

river.find_element(By.XPATH,
"/html/body/div/div/div/div[2]/div/form/div[1]/div[2]/input").send_keys("Kumar")

driver.find_element(By.XPATH,
"/html/body/div/div/div/div[2]/div/form/div[1]/div[3]/input").send_keys("110044")

time.sleep(3)

# Placing the Order.

driver.find_element(By.XPATH,
"/html/body/div/div/div/div[2]/div/form/div[2]/input").click()
time.sleep(5)

driver.find_element(By.XPATH,
"/html/body/div/div/div/div[2]/div/div[2]/div[9]/button[2]").click()
driver.quit()
44

# CODE TO FIND THE SITE PROVIDING MINIMUM COST IF


GADGETNOW PRICE IS LOWEST

if flipkart_price > gadgetnow_price:

if gadgetnow_price < sangeeta_price

print('Gadgetnow has lowest value')

time.sleep(3)

driver.get('https://shop.gadgetsnow.com/smartphones/apple-iphone-12-256-
gb-black-4- gb-ram-/10021/p_G201794?
gad_source=1&gclid=EAIaIQobChMI7qbuw8zmhAMVe6tmAh3FjgmEEAQ
YAiABEgLWwfD_BwE')

time.sleep(3)

driver.find_element(By.XPATH,
"/html/body/div[1]/div[2]/div[5]/div[1]/div/div[3]/div[2]/div[2]/div[2]/span/
a").click()

time.sleep(3)

driver.find_element(By.XPATH,
"/html/body/div[20]/div[2]/div/div/form/div[3]/div[2]/div[2]/a").click()

time.sleep(3)

driver.quit()
45

# CODE TO FIND THE SITE PROVIDING MINIMUM COST IF


SANGEETHA MOBILES PRICE IS LOWEST

if sangeeta_price < gadgetnow_price:

if sangeeta_price < flipkart_price:

print('SANGEETHA MOBILES has lowest value')

time.sleep(3)

driver.get('https://www.sangeethamobiles.com/product-details/apple-iphone-
12-black-256gb-mgjg3hna/8510')

time.sleep(3)

driver.quit()
46

5. Standardisation of Coding.

5.1 Code Efficiency. Initially the selected Software was Django.


The plan was to use Beautiful Soup to access the desired E-Commerce site’s
HTML code and scrap the required data from them for price comparison.
However, the time complexity of using the Beautiful Soup is higher in
comparison to the Selenium. Selenium is the super set of Django and all the
features of Django can be incorporated using Selenium. Selection of
Selenium as tool for scrapping purposes, the code efficiency increased
manifold. By using inbuilt libraries of selenium like Find() element, the no
of coding lines required was reduced manifold.

5.2 Error Handling. The entire code consist of only one function
which converts the string value of price received/scrapped from the E-
Commerce website into integer value for price comparison. There is a try
and catch mechanism implemented in this function to accept only integer
value in the price element and reject the symbols and decimal values to
avoid inconsistency in the fetched data.

5.3 Parameter calling. Selenium uses in-build functions like find ()


driver() etc to ease the job of the coder. However, it is the responsibility of
the coder to provide exact X path to the system for accurate fetching of the
data. Similarly, Functions like click(), send_keys() etc shall be accurately
mapped against the HTML code of the site for desired results.
47

5.4 Validation Checks. There is a need to submit ‘username’ and


‘password’ by the user for logging into the site having lowest price.
Therefore, it is mandatory that the user must have valid username name and
password as per the validation criteria implemented by the respective site.
The length and minimum criteria required for username and password is
same as E-Commerce website on which user want to search the item and
further place the order.

5.5 Coding Standards. A consistent naming pattern has been used


in the coding to enhance predictability and maintainability of the code. The
pattern followed is as follows:-

Name of the site in small letters_item_name

Name of the site in small letters__item_cost

Name of the site in small letters__price

Name of the site in small letters__item_description

Example: flipkart_item_cost=99000, Gadgetsnow_item_cost=67000


48

6. Testing. As the project is on bit large scale, we always need testing to


make it successful. If each component work properly in all respect and gives
desired output for all kind of inputs then project is said to be successful. So the
conclusion is-to make the project successful, it needs to be tested.

The testing done here was System Testing checking whether the user
requirements were satisfied. The code for the new system has been written
completely using python as the coding language, Django/ Selenium as the interface
for front-end designing. The new system has been tested well with the help of
the users and the system has been tested for each element using test websites
available online for selenium project. It saved a lot of time and cost. The
various tests which were carried out for this particular application are:-

6.1 Unit Testing.

Unit testing focuses verification efforts on the smallest unit of


the software design, the module. This is also known as “Module
Testing”. The modules are tested separately. This testing carried out
during programming stage itself. In this testing each module is found
to be working satisfactorily as regards to the expected output from the
module. In this project case the unit testing was carried out using
the following dummy sites:-

1. https://bugbug.io/blog/testing-frameworks/best-
selenium-practice-websites/
2. https://techbeamers.com/websites-to-practice-
selenium-webdriver-online/
49
50

6.2 Integration Testing. Data can be grossed across an interface; one

module can have adverse efforts on another. Integration testing is systematic

testing for construction the program structure while at the same time

conducting tests to uncover errors associated with in the interface. The

objective is to take unit tested modules and build a program structure. All

the modules are combined and tested as a whole. Here correction is difficult

because the isolation of cause is complicate by the vast expense of the entire

program. Thus in the integration testing stop, all the errors uncovered are

corrected for the text testing steps. In this project case the integration

testing was carried out using the following dummy sites:-

1. https://www.saucedemo.com/v1/inventory.html

2. https://www.inmotionhosting.com/

Note:- It is to be noted that this project is a web scrapping project

which works totally on automation. Due to this reason, it does not follow

the laid down paradigms of testing procedures adopted in common

projects.
51

6.3 System testing. System testing is the stage of


implementation that is aimed at ensuring that the system works accurately
and efficiently for live operation commences. Testing is vital to the success
of the system. System testing makes a logical assumption that if all the parts
of the system are correct, then goal will be successfully achieved. The
project was tested on the following real E-Commerce site for
implementation check of all user requirements :-

1. https://www.sangeethamobiles.com/
2. https://www.gadgetsnow.com/
3. https://www.flipkart.com

6.4 Validation Testing. There is a need to submit ‘username’ and


‘password’ by the user for logging into the site having lowest price.
Therefore, it is mandatory that the user must have valid username name and
password as per the validation criteria implemented by the respective site.
The length and minimum criteria required for username and password is
same as E-Commerce website on which user want to search the item and
further place the order.

6.5 Output Testing. After performing validation testing, the next step is
output testing of the system since no system could be useful if it does not
produce the required output in the specified format. Asking the users about
the format required by them tests the outputs generated by the system under
consideration. Here the output format is considered in two ways, one is on
the screen and other is the printed format. The output format on the screen is
found to be correct as the format was designed in the system designed phase
52

according to the user needs. For the hard copy also the output comes as the
specified requirements by the users. Hence output testing does not result any
corrections in the system.

6.6 User Acceptance Testing. User acceptance of a system is the key


factor of the success of any system. The system under study is tested for the
user acceptance by constantly keeping in touch with the prospective system
users at the time of developing and making changes wherever required.

6.7 Test Cases. Different sites with different currency and decimal
format were tested for validity of price conversion module of the system. In
this program, the entire concept is pertaining to scrapping of data. The get
module of selenium was found working on all test sites as well as real E-
Commerce site.

6.8 Modification and Improvement. At present the code is using


dummy site for placing the order. Same can be done using actual E-
Commerce site. However, every E-commerce site has implemented security
mechanism to prevent scrapping and use of automated code to access the
site. However, this issue can be resolved by hanging the IP address
whenever the user wants to access the site. There are various paid platform
from where you can subscribe and get fake IP address to do the scrapping.
53

7. Reports and Screenshots (Terminal/ Chrome).

USER VALIDATION FOR LAUNCHING APPLICATION

Description: The user will be asked User_Id and Password to launch the
application. The software will validate the inputs and launch the application only if
the given inputs match with the corresponding values in the database.
54

DETAILS OF THE PRODUCT ON FLIPKART


55

DETAILS OF THE PRODUCT ON FLIPKART ON TERMINAL

Description: The software will extract the details of the product selected by
the user on Flipkart. The details will consist of item name, cost and
description of the product.
56

DETAILS OF THE PRODUCT ON GADGETSNOW


57

DETAILS OF THE PRODUCT ON GADGET NOW ON TERMINAL

Description: The software will extract the details of the product selected by the
user on GADGET NOW. The details will consist of item name, cost and
description of the product.
58

DETAILS OF THE PRODUCT ON SANGEETHA MOBIES


59

DETAILS OF THE PRODUCT ON SANGEETHA MOBIES ON


TERMINAL

Description: The software will extract the details of the product selected by the
user on SANGEETHAMOBILES. The details will consist of item name, cost and
description of the product.
60

VALIDATING THE FUNCTION OF COMPARISION LOGIC

Description: This module will find the lowest price available among the sites and
recommend the site for purchase. In this case it has recommended ‘Flipkart” to the
user.
61

USER ACCEPTANCE LOGIC TO GO AHEAD WITH THE PURCHASE


62

ADDING THE ITEM INTO THE CART

Description: This module will add the item into the cart of the site having lowest
price.
63

PLACING THE ORDER

Description: This module will place the order on behalf of the user. From here, he
will operate on dummy site Swag Labs which will ask for buyer username and
password for the respective site and finalize the order. A dummy site has been
selected to prevent actual placing of the order as the project run on real time sites.
64

SITE REQUESTING USER CREDENTIALS FOR LOG IN.

CREDENTIALS PROVIDED BY THE USER


65

SELECTING AN ITEM ON DUMMY SITE

ADDING THE ITEM TO THE CART


66

PROVIDING BUYER’S DETAILS AND ADDRESS

CONFIRMING THE PAYMENT


67

ORDER PLACED
68

FUTURE SCOPE OF THE PROJECT

Marketing:

In the near future, Web scraping will be one of the important tools in the lead
generation process. The web scraping tool can make market research of the
particular product/services and enormous benefits to offer in the marketing field.

Customer Behavior & Buying Trends:

Web Scraping can help in getting insight of how customers/clients can think about
the product or services and helps to design a marketing strategy for the
product/services. The Web Scraping of user reviews and customer feedback will be
very important in the near future.

E-commerce & Price Intelligence:

Web Scraping is an important tool in determining the price tag of the product in an
eCommerce store. Most of the businesses are deriving the strategies for the data
that they have scraped for the digital monitoring of the competitor’s website. This
trend will be manifold in the coming years. So the need for web scraping services
will increase in the field of E-commerce stores, Hotel and Travel Industry.

Equity Research Market and Data Scraping:

Market trends and forecast plays an important role in the Equity-based Markets.
Investors also want to know about the latest and upcoming forecasts of the market
and web scraping can play an important role in tracking the marketing trends. This
information about the market can help investors to invest more sensibly.
69

LIMITATIONS, RECOMMENDATIONS AND CONCLUSION

Limitations of the Project.

At present the code is using dummy site for placing the order. Same can be
done using actual E-Commerce site. However, every E-commerce site has
implemented security mechanism to prevent scrapping and use of automated
code to access the site. However, this issue can be resolved by hanging the
IP address whenever the user wants to access the site. There are various paid
platform from where you can subscribe and get fake IP address to do the
scrapping.

Recommendations.

There is always room for improvement, and the software we created can also
be improved. This is especially because we had to create it within a limited
time. With more time, the software can be improved to include security and
different types of users. We can use proxy sites to get proxy IP address.
Additionally, we can put a time loop to prevent internet speed delays to
cause no availability of input for the next module.

Conclusion.

This was our project of System Design about “Products Price Comparison
Website Project” developed in Selenium/Django, using python as the
coding programming language. The Development of this system takes a lot
of efforts. We think this system gave a lot of satisfaction. Though every task
is never said to be perfect in this development field even more improvement
may be possible in this application.
70

BIBLIOGRAPHY

(a) Code with harry Python Course YouTube.

(b) Python Projects - Beginner to Advanced - GeeksforGeeks

(c) Core Python programming By Dr Nageswar Rao

(d) Elements of Project Development Reference Book by IGNOU.

(e) https ://www.academia.edu.


71

APPENDIX

OVERVIEW OF TECHNOLOGIES USED

INTRODUCTION

Python is a powerful multi-purpose programming language created by


Guido van Rossum. It has simple easy-to-use syntax, making it the perfect
language for someone trying to learn computer programming for the first time.
This is a comprehensive guide on how to get started in Python, why you should
learn it and how you can learn it. However, if your knowledge of other
programming languages and want to quickly get started with Python. Python is a
general-purpose language. It has wide range of applications from Web
development (like: Django and Bottle), scientific and mathematical computing
(Orange, SymPy, NumPy) to desktop graphical user Interfaces (Pygame, Panda3D).
The syntax of the language is clean and length of the code is relatively short. It's
fun to work in Python because it allows you to think about the problem rather
than focusing on the syntax.

Features of Python Programming:

 A simple language which is easier to learn Python has a very simple and
elegant syntax. It's much easier to read and write Python programs
compared to other languages like: C++, Java, C#. Python makes
programming fun and allows you to focus on the solution rather than
syntax.If you are a newbie, it's a great choice to start your journey with
Python.

 Free and open-source You can freely use and distribute Python, even for
commercial use. Not only can you use and distribute software’s written in
it, you can even make changes to the Python's source codE. Python has a
large community constantly improving it in each iteration.

 Portability
72

You can move Python programs from one platform to another, and run it
without any changes. It runs seamlessly on almost all platforms including
Windows, Mac OS X and Linux.

 Extensible and Embeddable

Suppose an application requires high performance. You can easily combine


pieces of C/C++ or other languages with Python code. This will give your
application high performance as well as scripting capabilities which other
languages may not provide out of the box.

 A high-level, interpreted language

Unlike C/C++, you don't have to worry about daunting tasks like memory
management, garbage collection and so on.
Likewise, when you run Python code, it automatically converts your code to
the language your computer understands. You don't need to worry about
any lower-level operations.

 Large standard libraries to solve common tasks

Python has a number of standard libraries which makes life of a


programmer much easier since you don't have to write all the code
yourself. For example: Need to connect MySQL database on a Web server?
You can use MySQLdb library using import MySQLdb .
Standard libraries in Python are well tested and used by hundreds of
people. So, you can be sure that it won't break your application.

 Object-oriented

Everything in Python is an object. Object oriented programming (OOP)


helps you solve a complex problem intuitively.
With OOP, you are able to divide these complex problems into smaller sets
by creating objects.

Features of Python Programming:


73

Web Applications

You can create scalable Web Apps using frameworks and CMS (Content
Management System) that are built on Python. Some of the popular platforms for
creating Web Apps are: Django, Flask, Pyramid, Plone, Django CMS. Sites like
Mozilla, Reddit, Instagram and PBS are written in Python.

Scientific and Numeric Computing

There are numerous libraries available in Python for scientific and numeric
computing. There are libraries like: SciPy and NumPy that are used in general
purpose computing. And, there are specific libraries like: EarthPy for earth
science, AstroPy for Astronomy and so on. Also, the language is heavily used in
machine learning, data mining and deep learning.

Creating software Prototypes

Python is slow compared to compiled languages like C++ and Java. It might not be
a good choice if resources are limited and efficiency is a must.

However, Python is a great language for creating prototypes. For example: You
can use Pygame (library for creating games) to create your game's prototype first.
If you like the prototype, you can use language like C++ to create the actual game.

Good Language to Teach Programming

Python is used by many companies to teach programming to kids and newbies. It


is a good language with a lot of features and capabilities. Yet, it's one of the
easiest languages to learn because of its simple easy-to-use syntax.
74

Syntax Overview

It's easier to understand and write Python code. Why? The syntax feels natural.
Take this source code for an example:

a=2

b=3

sum = a + b

print(sum)

Python has a large supporting community. There are numerous active forums
online which can be handy if you are stuck. Some of them are:

Learn Python subreddit

Google Forum for Python

Python Questions - Stack Overflow

Django documentation

Django is a high-level Python Web framework that encourages rapid development


and clean, pragmatic design. Built by experienced developers, it takes care of
much of the hassle of Web development, so you can focus on writing your app
without needing to reinvent the wheel. It’s free and open source.

Features of Django

o Rapid Development
o Secure
o Scalable
75

o Fully loaded
o Versatile
o Open Source
o Vast and Supported Community

Rapid Development
Django was designed with the intention to make a framework which takes less
time to build web application. The project implementation phase is a very time
taken but Django creates it rapidly.

Secure
Django takes security seriously and helps developers to avoid many common
security mistakes, such as SQL injection, cross-site scripting, cross-site request
forgery etc. Its user authentication system provides a secure way to manage user
accounts and passwords.

Scalable
Django is scalable in nature and has ability to quickly and flexibly switch from
small to large scale application project.

Fully loaded
Django includes various helping task modules and libraries which can be used to
handle common Web development tasks. Django takes care of user
authentication, content administration, site maps, RSS feeds etc.

Versatile
Django is versatile in nature which allows it to build applications for different-
different domains. Now a days, Companies are using Django to build various types
of applications like: content management systems, social networks sites or
scientific computing platforms etc.
76

Open Source
Django is an open source web application framework. It is publicly available
without cost. It can be downloaded with source code from the public repository.
Open source reduces the total cost of the application development.

Vast and Supported Community


Django is a one of the most popular web frameworks. It has widely supportive
community and channels to share and connect.
77

WAMP Server

WAMP is a Windows OS based program that installs and configures Apache


web server, MySQL database server, PHP scripting language, phpMyAdmin (to
manage MySQL database’s), and SQLiteManager (to manage SQLite database’s).
WAMP is designed to offer an easy way to install Apache, PHP and MySQL
package with an easy to use installation program instead of having to install and
configure everything yourself. WAMP is so easy because once it is installed it is
ready to go. You don’t have to do any additional configuring or tweaking of any
configuration files to get it running. There are usually two reasons why someone
chooses to install WAMP. They are looking to install WAMP for development
purposes or to run their own server.

WAMP Server Contains

PHP Admin
Allows you to change or add users and for making new databases
phpMyAdmin is a free software tool written in PHP, intended to handle the
administration of MySQLover the World Wide Web. phpMyAdmin supports a
wide range of operations with MySQL. The most frequently used operations are
supported by the user interface (managing databases, tables, fields, relations,
indexes, users, permissions, etc.), while you still have the ability to directly
execute any SQL statement.
78

Features

 Intuitive web interface


 Support for most MySQL features:
o Browse and drop databases, tables, views, fields and indexes.
o Create, copy, drop, rename and alter databases, tables, fields
and indexes.
o Maintenance server, databases and tables, with proposals on
server configuration.
o Execute, edit and bookmark any SQL-statement, even batch-
queries.
o Manage MySQL users and privileges
o Manage stored procedures and triggers.

 Import data from CSV and SQL


 Export data to various formats: CSV, SQL, XML, PDF, ISO/IEC 26300 -
OpenDocument Text and Spreadsheet, Word, LATEX and others
 Administering multiple servers
 Creating PDF graphics of your database layout
 Creating complex queries using Query-by-example (QBE)
 Searching globally in a database or a subset of it
 Transforming stored data into any format using a set of predefined
functions, like displaying BLOB-data as image or download-link
 And much more...
79

SQL Server and Database System

SQL Server is a relational database management


system from Microsoft that's designed for the enterprise environment. SQL Server
runs on T-SQL (Transact -SQL), a set of programming extensions from Sybase and
Microsoft that add several features to standard SQL, including transaction control,
exception and error handling, row processing, and declared variables.

Generically, any database management system (DBMS) that can respond to


queries from client machines formatted in the SQL language. When capitalized,
the term generally refers to either of two database management products
from Sybase and Microsoft. Both companies offer client-server DBMS products
called SQL Server.
80

Using WAMP as a Development Server


You can use WAMP to develop and test websites locally on their own
computer instead of having to get a web hosting account to develop with. Most
people will be using WAMP for development purposes such as learning how to
create websites with HTML, PHP, and MySQL.

Using WAMP as a Production Server

WARNING: WAMP was designed to be a testing and development server,


not an actual production server. WAMP does not come with any real security in
place so it offers no protection from any kind of attack. Any 10-year-old with
access to the internet can easily hack your WAMP server.
If your website(s) have highly sensitive data (such as credit card numbers,
social security numbers, user ids, passwords, etc.), you need to take this in
consideration before your put this information online. Unless you are an
experienced system administrator and can configure WAMP to be more secure,
you should never user WAMP for a production server.
MySQL Configuration
To begin MySQL installation, first download latest version of Essentials as
an MSI package.
During MySQL installation, select Typical installation and use default configuration
values except for Sign-Up where you probably want to select Skip Sign-Up. When
Setup Wizard is completed, make sure the option Configure the MySQL Server
now is set. For MySQL Server Instance Configuration, select Standard
Configuration. Next, you must set option Include Bin Directory in Windows PATH.
This setting is crucial, otherwise a required library, libMySQL.dll, will not be found
later during Apache startup.
81

Finally, enter a proper root password. There is no need to neither enable


remote root access nor create an Anonymous Account.
Please inspect messages during MySQL startup and verify that MySQL has
been started successfully. Then, you must reboot the system. Otherwise, the
required librarylibMySQL.dll will not be found during Apache startup when
Apache is trying to load Apache's PHP module and Apache will, perhaps a bit
confusingly, complain that it is unable to load the PHP's MySQL
library, php_mysql.dll. Therefore, it is necessary to reboot the system at this stage
and then continue to PHP configuration.

PHP Configuration
PHP for Windows must be installed from the zip package, not using the
installer because the installer does not work correctly when setting up the
configuration files. Download the latest Windows binary version from the 5.x
release series.
Create folder C:\Program Files\PHP5 and unzip the downloaded package
there. Then, in folder C:\Program Files\PHP5 you need to copy the file php.ini-
recommended asphp.ini and make two changes into the php.ini file.
Change extension_dir to:

extension_dir = "C:/Program Files/PHP5/ext/"

and also uncomment the following line:

extension=php_mysql.dll

That is all what is needed for PHP configuration. Additionally, however, if


you wish to run PHP from the command line it would be useful to add its
installation directory to Windows PATH but for WAMP to operate it is not
82

required. After Apache is installed and configured, also PHP configuration can be
tested.

You might also like