achievers/cloudfront-ip-alert

显示更新的Amazon CloudFront IP地址。

0.3 2017-02-02 15:27 UTC

This package is not auto-updated.

Last update: 2024-09-23 15:38:52 UTC


README

当Amazon CloudFront IP地址更新时发送电子邮件

======= 基本有用功能列表

  • 轻量级库
  • 检查Amazon CloudFront IP并提醒用户。
  • 可以轻松与电子邮件通知或第三方通知集成。

描述

安装

最简单的安装方法是使用Composer。

{
    "require": {
        "achievers/cloudfront-ip-alert": "0.*"
    }
}

用法

请查看index.php以获取示例。这里是快速开始:

require_once('CloudFront/IPWhiteList.php');

use Achievers\CloudFront\IPWhiteList;

$cloudFrontIP = new IPWhiteList(); // Initialize a class
$listOfIPs = $cloudFrontIP->getLastCloudFrontFile(); //Get the latest CloudFront file
$data = $cloudFrontIP->checkIP($listOfIPs); //Return a list of changes

配置

您可以传递配置以自定义cloudFrontType:Amazon CloudFront文件包含不同服务的IP地址。默认为"CLOUDFRONT"。

cloudFrontLastFile:我们将存储最新文件的完整文件路径。例如:'/tmp/ip-ranges-old.json'。

cloudFrontUrl:指向Amazon CloudFront文件的URL。默认'https://ip-ranges.amazonaws.com/ip-ranges.json'

许可证

MIT许可证