Home  >  Article  >  Backend Development  >  手把手教你做关键词匹配项目(搜索引擎)---- 第一天,教你做----_PHP教程

手把手教你做关键词匹配项目(搜索引擎)---- 第一天,教你做----_PHP教程

WBOY
WBOYOriginal
2016-07-13 10:21:14940browse

手把手教你做关键词匹配项目(搜索引擎)---- 第一天,教你做----

第一天

收到需求,需求如下:

   1. 收集关键词,构建关键词词库。

收到这个任务,第一想法,这还不简单吗? 马上动手创建一个关键词录入界面,保存到数据库。 第一步完成了,哈哈大笑了一天,没想到事情原来如此的简单。

 

  数据库配置文件: config.php

$database_host = 192.168.1.1
$database_user = xiaoshuaishuai
$database_password = xiaoshuaishuai
$database_charset = "utf-8"

  后台逻辑处理: keywords.php

 

php

include "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($keywords as $keyword){

      //save $keyword to database
      
      $sql = "insert into keywords(word) values ('$keyword')";
      mysql_query($sql,$conn);     
    
}

mysql_close($conn);

 

百度搜索引擎中搜索词是如与跟推广关键词匹配的?

现在 百度推广有精确、短语、广泛三种匹配方式,,一般来说黄金组合匹配方式是:广泛匹配+搜索词报告+否定关键词。流量来说的话就是 广泛>短语>精确啦,可以根据你们呢的实际情况进行设置!
 

用搜索引擎搜索时,如果有三个关键词,要精确匹配,该怎输入?

如果要精确匹配,需要ABC都带引号。
 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/860060.htmlTechArticle手把手教你做关键词匹配项目(搜索引擎)---- 第一天,教你做---- 第一天 收到需求,需求如下: 1. 收集关键词,构建关键词词库。 收到这...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn