| #135 | return preg_match('/[\x{4e00}-\x{9fa5}\x{3400}-\x{4dbf}\x{20000}-\x{2a6df}\x{2a700}-\x{2b73f}\x{2b740}-\x{2b81f}\x{2b820}-\x{2ceaf}\x{2ceb0}-\x{2ebef}\x{30000}-\x{3134f}\x{31350}-\x{323af}]/u', $str); |
| #136 | } |
| #137 | |
| #138 | // 随机UserAgent设置HTTP请求头模拟来自不同客户端的请求 |
| #139 | function getUserAgents() |
| #140 | { |
| #141 | return [ |
| #142 | // 百度蜘蛛 |
| #143 | 'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)', |
| #144 | // 谷歌蜘蛛 |