$title

$content
HTM ); echo "saved as " . $file . "\n"; //hub-notification $params = array( 'hub.mode' => 'publish', 'hub.url' => $self, ); $enc = array(); foreach ($params as $key => $val) { $enc[] = urlencode($key) . '=' . urlencode($val); } $postMsg = implode('&', $enc); $ctx = stream_context_create( array( 'http' => array( 'method' => 'POST', 'header' => array( 'Content-type: application/x-www-form-urlencoded', ), 'content' => $postMsg, 'ignore_errors' => true, ) ) ); $res = file_get_contents($hub, false, $ctx); list($http, $code, $rest) = explode(' ', $http_response_header[0]); if (intval($code / 100) === 2) { echo "notified hub\n"; exit(); } echo "Error notifying hub: HTTP status was not 2xx; got $code\n"; echo $res . "\n"; ?>