PHP code example of kaleidpixel / jpipallow
1. Go to this page and download the library: Download kaleidpixel/jpipallow 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/ */
kaleidpixel / jpipallow example snippets
kaleidpixel\JPIPAllow;
$before_str = <<<EOL
## IP address of its In-House server.
Allow from 103.xxx.xxx.xxx
Allow from 203.xxx.xxx.xxx
EOL;
$ip = new JPIPAllow(
[
'server' => 'apache',
'output_path' => __DIR__ . DIRECTORY_SEPARATOR . '.htaccess',
'add_before_str' => $before_str
]
);
$ip->read(true);
shell
$ php ./example/index.php