From 9a6a60a9c1c7f781790849173e309ac0664d7b35 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Thu, 8 Jul 2010 07:03:25 -0700 Subject: mucho progress on notifier, email style dfrn url's --- mod/dfrn_request.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mod/dfrn_request.php') diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index b6ae4346d..7fb55c4bf 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -166,6 +166,15 @@ function dfrn_request_post(&$a) { return; } + if(strstr($url,'@')) { + $username = substr($url,0,strpos($url,'@')); + $hostname = substr($url,strpos($url,'@') + 1); + require_once('Scrape.php'); + + $parms = scrape_meta('http://' . $url); + if((x($parms,'dfrn-template')) && strstr($parms['dfrn-template'],'%s')) + $url = sprintf($parms['dfrn-template'],$username); + } $ret = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' LIMIT 1", intval($uid), -- cgit v1.2.3