承接 jaybizzle/laravel-crawler-detect 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jaybizzle/laravel-crawler-detect

最新稳定版本:v1.3.0

Composer 安装命令:

composer require jaybizzle/laravel-crawler-detect

包简介

A Laravel package to detect web crawlers via the user agent

README 文档

README

Build Status Total Downloads Scrutinizer Code Quality StyleCI

A Laravel wrapper for CrawlerDetect - the web crawler detection library

Installation

Run composer require jaybizzle/laravel-crawler-detect 1.* or add "jaybizzle/laravel-crawler-detect": "1.*" to your composer.json file.

The last version compatible with Laravel 4 was v1.0.2 so if you need that, you will have to fix your composer.json to that specific version.

Add the following to the providers array in your config/app.php file..

  Jaybizzle\LaravelCrawlerDetect\LaravelCrawlerDetectServiceProvider::class,

...and the following to your aliases array...

  'Crawler'   => Jaybizzle\LaravelCrawlerDetect\Facades\LaravelCrawlerDetect::class,

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Usage

use Crawler;

// Check current 'visitors' user agent
if(Crawler::isCrawler()) {
  // true if crawler user agent detected
}


// Pass a user agent as a string
if(Crawler::isCrawler('Mozilla/5.0 (compatible; aiHitBot/2.9; +https://www.aihitdata.com/about)')) {
  // true if crawler user agent detected
}

统计信息

  • 总下载量: 2.4M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 327
  • 点击次数: 2
  • 依赖项目数: 24
  • 推荐数: 0

GitHub 信息

  • Stars: 321
  • Watchers: 12
  • Forks: 27
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-22