Skip to content

Instantly share code, notes, and snippets.

View adrinavarro's full-sized avatar
🧡

Adrián Navarro adrinavarro

🧡
View GitHub Profile
<?php
class Superfeedr {
protected $callback = 'http://mydomain/callback.php';
private $authentication = 'myuser:mypassword';
public $password = 'myrandompassphrase';
function action($mode = 'subscribe', $url, $secret = null) {
// if you are going to use HMAC checks in a per-feed basic, use $secret (otherwise it will use the password, which will work great, unless you change it, as it will start rejecting every pushed entry)
$secret = ($secret?$secret:$this->password);
$post = '';