Patch Notification Robot: Providing you the latest update notifications. https://www.patchbot.de
Find a file
2020-06-21 21:48:18 +02:00
modules JDigitalSimulator: fix typo 2020-06-20 11:46:35 +02:00
modules_test Import source 2019-07-15 22:27:48 +02:00
twitter-php@5ef6a383aa Update twitter-php to v4.1.1 2020-04-01 17:45:00 +02:00
.gitignore Don't track database and timestamp files in repo 2020-05-01 15:07:47 +02:00
.gitmodules Add Twitter for PHP 2019-12-01 18:17:21 +01:00
Database.php Sort objects by timestamp 2020-04-05 10:59:00 +02:00
empty.json Import source 2019-07-15 22:27:48 +02:00
LICENSE Initial commit 2019-07-15 22:10:35 +02:00
PatchBase.php Tidy up GitHub release tags 2020-05-01 15:10:56 +02:00
PatchCollector.php New feature: Branch name for software products 2020-04-01 17:25:40 +02:00
PatchCollector_test.php Import source 2019-07-15 22:27:48 +02:00
PatchFeeder.php RSS feed validates now 2020-04-05 15:17:30 +02:00
PatchObject.php Tidy up GitHub release tags 2020-05-01 15:10:56 +02:00
PatchTwitter.php Twitter client prints tweet length 2020-04-24 19:38:06 +02:00
PatchViewer.php HTML page: add link to self 2020-06-21 21:48:18 +02:00
README.md Update Readme 2020-06-14 23:35:06 +02:00
TwitterKeys.php Add example config for Twitter 2020-04-01 17:34:15 +02:00

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 PatchBase base 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)

Donate