1. Go to this page and download the library: Download tomnomnom/phpsecuritytxt library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tomnomnom / phpsecuritytxt example snippets
$raw = file_get_contents("test/fixtures/basic.txt");
$sectxt = new \SecurityTxt\Parser($raw);
$raw = file_get_contents("test/fixtures/basic.txt");
$sectxt = new \SecurityTxt\Parser();
$sectxt->parse($raw);
foreach ($sectxt->contact() as $contact){
echo "Contact: {$contact}\n";
}
foreach ($sectxt->encryption() as $encryption){
echo "Encryption link: {$encryption}\n";
}
foreach ($sectxt->acknowledgement() as $acknowledgement){
echo "Acknowledgement link: {$acknowledgement}\n";
}
foreach ($sectxt->errors() as $error){
echo "Error: {$error}\n";
}
foreach ($sectxt->comments() as $comment){
echo "Comment: {$comment}\n";
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.