/** * Test that a notification handler is there and is reponding * correctly. This is called before adding a subscription. * * @param string $feed the feed to verify * * @return boolean success result */ function testNotificationHandler($feed) { $notifyUrl = $this->getNotifyUrl(); $notifier = new RSSCloudNotifier(); if (isset($this->domain)) { // 'domain' param set, so we have to use GET and send a challenge common_log(LOG_INFO, 'RSSCloud plugin - Testing notification handler with challenge: ' . $notifyUrl); return $notifier->challenge($notifyUrl, $feed); } else { common_log(LOG_INFO, 'RSSCloud plugin - Testing notification handler: ' . $notifyUrl); return $notifier->postUpdate($notifyUrl, $feed); } }