1. Go to this page and download the library: Download phrozenbyte/pico-robots 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/ */
phrozenbyte / pico-robots example snippets
$robots = [
[
'user_agents' => string[], /* list of user agents, or '*' to match all web robots */
'disallow' => string[], /* list of URLs that shouldn't be crawled */
'allow' => string[] /* list of disallowed URLs that are allowed to be crawled even though */
],
…
]
$sitemap = [
[
'url' => string, /* URL of the concerned page, including the protocol */
'modificationTime' => int, /* Unix timestamp of the page's last modification time */
'changeFrequency' => string, /* how frequently the contents of the page may change */
'priority' => float /* priority of that URL relative to other URLs on the site */
],
…
]