Hello Guys, Today i have an in-trusting topic how you can make a search engine like Google,Yahoo,Msn, Aol Altavista for free. It was not an easy Task you have to spent too much time on the project now lets start making a search engine !
What is Requirements:
To start the development you need is free software like server such as WAMP server (http://www.wampserver.com/en) and for programming purpose you have to download PHP (http://www.php.net/) and for writing the php page you just need any simple text editor like notepad or notepad++ or context or you can also use editors such as eclipse and netbeans with php plug-in.
You also require some knowledge in simple php programming and MySQL database knowledge. You also require modern browser such as IE7+, Mozilla Firefox 3+ and Google Chrome.
If you do not have basic knowledge then you can get that from the http://www.w3schools.com
Step 1: Create the Database
First start the your server application i.e. WAMP or XAMPP, then start your browser and go to the url http://localhost/ and you will get this type of page in wamp server.
Then select the phpmyadmin link on Your Aliases section on that page.
and create the database named "WEB"
After creating the database create the table named web with number equals to 2.
Fields are Title and Address
attributes of both the fields are
Fields: Title Address
Type: varchar varchar
Index: -------- Primary
and press the button Save.
Step 2: Create the website and its files
Go to the directory where WAMP server is installed. You will find the www directory and go inside that directory and create the new directory called search-engine.
Now inside the search-engine directory create the file named index.php using any text editors mentioned above which is the entry point for site.
Also create the files header.php, footer.php, connect.php and search.php and insert.php
header.php and footer.php contain the common content which require for all the pages.
connect.php contain the code for database connectivity which can be reusable.
search.php contains the code for displaying the result for search query
Step 3: Detailed Information about each file
header.php :-
This page is the included in all the pages such as index.php, search.php and insert.php .This page contains code for the upper part of the page which is common for all the pages such as header, company logo, your name and name of company.
footer.php :-
This page is also included in all the pages,This file contains the code for the lower part of the page such as your name, company name, copyright notices
connect.php :-
This page contains the code for the connection with MySQL database with php which is require for all the pages. So we will write this once and reuse it number of times.
index.php :-
This is the entry point for the site.This page includes header.php, connect.php, search box for entering the query and search button and footer.php .
search.php :-
This page contains the most important part of the website i.e. how to obtain the search result from the database and how to properly displayed on the page.
insert.php :-
This page is used bu user for entering its own site into the database at any time. This page improves the functionality of the site and provide the option for making the database bigger and bigger.
You can also add cascading style sheet(CSS) file for your site for decoration if you want.
Completing your site:
You can also improve the functionality of site using the features such as AJAX for displaying the search suggestion like Google. Then you can also create the application which can read the web page and find all the links in that page and enter that link in the database. This application will make your database very big in small amount of time.
In this files I don't have created the header.php, footer.php and connect.php because here list of files are very less
You can download all the files here.
You can also view the implementation at here.
You can view the tutorial video on youtube.com at hardikpatel0491 channel and subscribe it.
Note that in this example name of database of mine is websearch not WEB, so make the change according to it.
Remove the .txt extension from every file after downloading.
Save all the file into www directory of WAMP server.
Instead of "database name" and "password" use your own database name and password.
Thank you for reading this post Special thankxs to Hardik Patel
You can also watch videos at YouTube, Hardik's channel name is hardikpatel0491. If you have any query then you can mail at hardik.patel0491@gmail.com
0 comments:
Post a Comment
What's on your Mind Say it below