定制 tomnomnom/phpsecuritytxt 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

tomnomnom/phpsecuritytxt

Composer 安装命令:

composer require tomnomnom/phpsecuritytxt

包简介

A parser for security.txt files

README 文档

README

Work in progress.

Install

Install from packagist:

▶ composer require tomnomnom/phpsecuritytxt

Usage

Parse a security.txt file:

<?php
$raw = file_get_contents("test/fixtures/basic.txt");

$sectxt = new \SecurityTxt\Parser($raw);

You can create and empty object and call parse() instead:

<?php
$raw = file_get_contents("test/fixtures/basic.txt");

$sectxt = new \SecurityTxt\Parser();
$sectxt->parse($raw);

Get contact info:

<?php
foreach ($sectxt->contact() as $contact){
    echo "Contact: {$contact}\n";
}

Get encryption info:

<?php
foreach ($sectxt->encryption() as $encryption){
    echo "Encryption link: {$encryption}\n";
}

Get acknowledgement info:

<?php
foreach ($sectxt->acknowledgement() as $acknowledgement){
    echo "Acknowledgement link: {$acknowledgement}\n";
}

Get parser errors:

<?php
foreach ($sectxt->errors() as $error){
    echo "Error: {$error}\n";
}

Get comments:

<?php
foreach ($sectxt->comments() as $comment){
    echo "Comment: {$comment}\n";
}

TODO

  • Add support for fetching URLs directly
  • Improve test coverage
  • Set up travis to run tests

统计信息

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

GitHub 信息

  • Stars: 13
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固