teach you to do keyword matching project (search engine)----first day, teach you to do----
First day
To receive the demand, the requirements are as follows:
1. Collect keywords and build keyword thesaurus.
Is it not easy to receive this task, the first thought? Do it now. Create a keyword entry interface, save to the database. The first step is complete, laughed a day, did not think things so simple.
Database configuration file: config.php
$database _host = 192.168.1.1$database _user = Xiaoshuaishuai$database _password = Xiaoshuaishuai $database _charset = "Utf-8"
background logic processing: Keywords. php
PHPinclude "config.php"$keywords$_request["keywords"]; $con mysql_connect ($database _host,$database _user,$database _password); mysql_query ("SET NAMES '$database _charset'",$conn); mysql_select_db ("Dict",$conn); foreach ($keywordsas$keyword) { //save $keyword to Database $sql = "INSERT INTO keywords (word) VALUES ('$keyword')"; mysql_query ($sql,$conn); } Mysql_close ($conn);
Search words in Baidu search engine, such as with the promotion of keyword matching?
Now Baidu Promotion has accurate, the phrase, the widespread three kinds of matches the way,, generally the gold combination match way is: Broad match + Search word report + negative keyword. The flow of words is broad > phrase > Accurate, you can according to the actual situation to set!
Search engines When searching, if there are three keywords, to exactly match, how to input?
If you want to match exactly, you need ABC to be quoted.
http://www.bkjia.com/PHPjc/860060.html www.bkjia.com true http://www.bkjia.com/PHPjc/860060.html techarticle Hand- taught you to do keyword matching project (search engine)----The first day, teach you to do----the first day to receive demand, the requirements are as follows: 1. Collect keywords and build keyword thesaurus. Received this ...