关键字匹配服务器 libra-server

码农软件 · 软件分类 · 其他开发相关 · 2019-10-24 08:12:22

软件介绍

A keyword match server

为什么需要关键字匹配服务器?你可能想用正则去匹配,不过细想一下,如果有10万个关键字,那不是要用正则匹配10万次。 

而是用关键字匹配服务器只需要匹配一次即可,速度非常快,速度只跟你要匹配的原文长度有关。 

此外,使用此服务器还可以过滤敏感词之类的用途。


#安装方法# 

1.安装libevent(http://monkey.org/~provos/libevent/

2.安装libdatrie(http://linux.thai.net/~thep/datrie/datrie.html

3.make 



PHP接口: 

存储

<?php
include('matcher.php');  
$matcher = new Matcher('192.168.10.20'); $matcher->set('hello'); $matcher->set('world'); $matcher->set('kitty'); ?>



匹配

<?php
include('matcher.php'); $matcher = new Matcher('192.168.10.20'); $matchs = $matcher->gets('hello world, hello kitty') if (!empty($matchs)) {    print_r($matchs); } ?>

输出:

Array (     [hello] => hello
    [world] => world
    [kitty] => kitty )

本文地址:https://www.codercto.com/soft/d/17437.html

网络江湖三十六计

网络江湖三十六计

程苓峰,王晶 / 经济日报出版社 / 2009-6 / 40.00元

《网络江湖三十六计》内容简介:貌合神离:卖个破绽给对手,让他尝到甜头,自认为可安枕无忧,往往就松懈大意。于是,自己蓄力并反击的机会就来了。诱敌就是“貌合”,暗地发力就是“神离”。一起来看看 《网络江湖三十六计》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具