kgsdev/killbot.pw 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

kgsdev/killbot.pw

最新稳定版本:1.0.0

Composer 安装命令:

composer require kgsdev/killbot.pw

包简介

Wrapper for killbot.pw

README 文档

README

installing dependency by typing:

composer require kgsdev/killbot.pw

Create file index.php and paste the code below:

<?php

require_once __DIR__ . '/vendor/autoload.php';

use Kgsdev\Killbot;

class MyKillBot extends Killbot
{
  /**
   * apiKey
   *
   * KILLBOT.PW APIKEY
   * find your key at: https://killbot.org/dashboard
   * 
   * @return string
   */
  public function apiKey()
  {
    return '';
  }

  /**
   * url for allowed visitor
   * redirect if the visitor isnt bot
   * 
   * @return string
   */
  public function botRedirect()
  {
    return 'https://google.com';
  }

  /**
   * whiteLists
   *
   * list of white listed IPS
   * 
   * @return array
   */
  public function whiteLists()
  {
    return [
      '127.0.0.1'
    ];
  }

  /**
   * logsFile
   * 
   * log file name
   * 
   * @return void
   */
  public function logsFile()
  {
    return 'visitor.logs';
  }

  public function __invoke()
  {
    if (collect($this->whiteLists())->contains($this->ipv4())) {
      return $this->writeLog(['WHITE LISTED!']);
    }

    if ($this->botRedirect() != $this->currentURL()) {
      $this->runBlocker();
    }
  }
}

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-08-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固