2012-06-02 21:05:23 -04:00
|
|
|
<?php
|
|
|
|
|
2017-04-30 00:07:00 -04:00
|
|
|
use Friendica\App;
|
2017-11-06 21:22:52 -05:00
|
|
|
use Friendica\Network\Probe;
|
2012-06-02 21:05:23 -04:00
|
|
|
|
2017-01-09 07:12:54 -05:00
|
|
|
function acctlink_init(App $a) {
|
2016-02-07 09:11:34 -05:00
|
|
|
|
2017-03-21 12:02:59 -04:00
|
|
|
if(x($_GET,'addr')) {
|
2012-06-02 21:05:23 -04:00
|
|
|
$addr = trim($_GET['addr']);
|
2017-11-06 21:22:52 -05:00
|
|
|
$res = Probe::uri($addr);
|
2012-06-02 21:05:23 -04:00
|
|
|
//logger('acctlink: ' . print_r($res,true));
|
2017-03-21 12:02:59 -04:00
|
|
|
if($res['url']) {
|
2012-06-02 21:05:23 -04:00
|
|
|
goaway($res['url']);
|
|
|
|
killme();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|