diff --git a/bot.php b/bot.php index dfae2db..7d23083 100644 --- a/bot.php +++ b/bot.php @@ -156,6 +156,10 @@ foreach ($articles as $article) { file_put_contents('.lastrun', time()); } } + if (!empty($config['INDEXNOW'])) { + $client = new \GuzzleHttp\Client(); + $client->request('GET', 'https://www.bing.com/indexnow?url='.$link.'&key='.$config['INDEXNOW']); + } } else { echo $description."\n"; } diff --git a/config.yml.example b/config.yml.example index fb7a030..75de749 100644 --- a/config.yml.example +++ b/config.yml.example @@ -8,3 +8,4 @@ TELEGRAM_API_KEY: some-key-here TELEGRAM_BOT_NAME: bot name TELEGRAM_CHAT_ID: id BITLY_TOKEN: token +INDEXNOW: see https://www.bing.com/indexnow