-
simplified Chinese character -
Simplified Chinese English
Shangpin China Joins Hands with Beisheng Internet to Create a New Chapter in Website Construction
Batch Optimization of Dedecms Article Keywords Based on Discuz Online Word Segmentation
Batch Optimization of Dedecms Article Keywords Based on Discuz Online Word Segmentation
<? php
require_once(dirname(__FILE__).”/ include/common.inc.php”);
$id = isset($id) && is_numeric($id) ? $ id : 0;
for ($a=$id; $a<$id+10; $a++){
$row = $dsql->GetOne(” SELECT arc.title,tp.body FROM `@__archives` arc LEFT JOIN `@__addonarticle` tp ON arc.id=tp.aid where arc.id=’$a’ “);
if(is_array($row))
{
$title = $row['title'];
$body = $row['body'];
$keywords=zhgetkey($title.$body);
$dsql->ExecuteNoneQuery(” Update `@__archives` set keywords=’$keywords’ where id=’$a’ “);
echo $a.’:’.$ keywords.’< br />’;
}
}
if ($a>80000){break;}
echo “<script>”;
echo “setTimeout(”location.replace(‘c.php?id=$a’)”,0)”;
echo “</script>”;
function zhgetkey($contents){
$rows = strip_tags($contents);
$arr = array(‘ ‘,’ ‘,”s”, “rn”, “n”, “r”, “t”, “>”, ““”, “””,”<br />”);
$qc_rows = str_replace($arr, ”, $rows);
if(strlen($qc_rows)>2400){
$qc_rows = substr($qc_rows, ’0′, ’2400′);
}
$data = @implode(”, file(“ //keyword.discuz.com/related_kw.html?title= $qc_rows&ics=gbk&ocs=gbk”));
preg_match_all(“/<kw>(.*)A[(.*)]](.*)></kw>/”,$data, $out, PREG_SET_ORDER);
$key=”";
for($i=0;$i<5;$i++){
$key=$key.$ out[$i][2];
if($out[$i][2])$key=$key.”,”;
}
return $key;
}
function cutstr_html($string, $sublen)
{
$string = strip_tags($string);
$string = preg_replace (‘/n/is’, ”, $string);
$string = preg_replace (‘/ | /is’, ”, $string);
$string = preg_replace (‘/ /is’, ”, $string);
preg_match_all(“/[x01-x7f]|[xc2-xdf][x80-xbf]|xe0[xa0-xbf][x80-xbf]|[xe1-xef][x80-xbf][x80-xbf]|xf0[x90-xbf][x80-xbf][x80-xbf]|[xf1-xf7][x80-xbf][x80-xbf][x80-xbf]/”, $string, $t_string);
if(count($t_string[0]) – 0 > $sublen) $string = join(”, array_slice($t_string[0], 0, $sublen)).”…”;
else $string = join(”, array_slice($t_string[0], 0, $sublen));
return $string;
}
?>
Station building process
-
Website requirements -
Website planning scheme -
Page design style -
Confirm delivery for use -
Data entry optimization -
Program design and development -
Follow up service -
contact number 010-60259772
Hot tags
-
Website construction -
Food website construction -
WeChat applet development -
Applet development -
Wuxi website construction -
Website construction of research institute -
Shenyang website construction -
Langfang website construction -
Zhengzhou website construction -
Construction of wedding photography website -
Mobile terminal website construction -
University website production -
Tianjin website construction -
Education website construction -
Brand website construction -
Government website construction -
Beijing website construction -
Website Design -
Website production
Latest articles
-
Website construction scheme: Fresh makeup aesthetics website Type: website construction 2025-03-13 -
Enterprise website construction plan: create a new business card for the network and open the digital future Type: website construction 2025-03-11 -
High end website production solution Type: website construction 2025-02-18
Recommended News
-
What are the good ways to build an enterprise official website? Before setting up an official website, you must tell the target group, region, country, etc. Provide an official website 2021-06-23 -
WordPress Plug in Making Tutorial: Saving Data to Database Beijing website construction company Shangpin China (www.sino web. net): This article is 2013-05-06 -
Plan the browsing mechanism of the site 1、 To create a link back to the home page, you should place a link back to the home page on each page of the site. Such as 2015-08-22 -
Four Don'ts in Website Construction With the development of the Internet, businesses and enterprises can see the huge business opportunities in this invisible market in order to bring their own products 2016-01-15 -
Will the combination of SEO and SEM be a good result? Shangpin China Website Construction Company didn't even know the difference between SEO and SEM when it first started 2015-02-19 -
Basic Steps of Search Engine Oriented Website Construction The specific contents include: confirmation of the overall style of website production, then include a& 2013-09-14
Make an appointment with a professional consultant to communicate!
Disclaimer