set_raw_data($data); $feed->init(); echo "Feed title:" . $feed->get_title(); foreach ($feed->get_items() as $item) { echo $item->get_permalink(); echo $item->get_content(); } killme(); } function dfrn_notify_content(&$a) { if(x($_GET,'dfrn_id')) { // initial communication from external contact $hash = random_string(); $status = 0; $r = q("DELETE FROM `challenge` WHERE `expire` < " . intval(time())); $r = q("INSERT INTO `challenge` ( `challenge`, `dfrn-id`, `expire` ) VALUES( '%s', '%s', '%s') ", dbesc($hash), dbesc(notags(trim($_GET['dfrn_id']))), intval(time() + 60 ) ); $r = q("SELECT * FROM `contact` WHERE `issued-id` = '%s' AND `blocked` = 0 LIMIT 1", dbesc($_GET['dfrn_id'])); if((! count($r)) || (! strlen($r[0]['prvkey']))) $status = 1; $challenge = ''; openssl_private_encrypt($hash,$challenge,$r[0]['prvkey']); $challenge = bin2hex($challenge); echo '' .$status . '' . $_GET['dfrn_id'] . '' . '' . $challenge . '' . "\r\n" ; session_write_close(); exit; } }