teach you to do keyword matching project (search engine)----first day, teach you to do----_php Tutorial

Source: Internet
Author: User

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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.