Patch Notification Robot: Providing you the latest update notifications.
https://www.patchbot.de
| modules | ||
| modules_test | ||
| twitter-php@450baa2fd7 | ||
| .gitignore | ||
| .gitmodules | ||
| Database.php | ||
| empty.json | ||
| HostOption.php | ||
| LICENSE | ||
| PatchBase.php | ||
| PatchCollector.php | ||
| PatchCollector_test.php | ||
| PatchFeeder.php | ||
| PatchObject.php | ||
| PatchTwitter.php | ||
| PatchViewer.php | ||
| README.md | ||
| TwitterKey.php | ||
PatchBot
Patch Notification Robot: Providing you the latest update notifications.
Installation
Run periodically php PatchCollector.php to collect the latest product versions from vendor websites. Limit requests, so web servers will not overload.
For data export to webpage, RSS feed and Twitter use output of PatchViewer.php, PatchFeeder.php or PatchTwitter.php. Twitter requires a separate developer registration.
Writing web scraper
- Inherit from
PatchBasebase class:
class MyProgram extends PatchBase {
function __construct() {
parent::__construct('Vendor', 'Product', 'https://www.vendor.com/product/');
[$this->patch->setBranch('Branch');]
}
...
}
- Implement
check()method to extract version information from website using this template:
function check() : bool {
if ($this->fetch('https://www.url.com/' [, true]))
return $this->parse...
return false;
}
- Currently available parser functions for JSON and RegEx:
parse_json(string)parse(string)
