1
0
Fork 0
friendica_2020-09-1_sharedH.../src/Module/Acctlink.php

27 lines
406 B
PHP
Raw Normal View History

2018-10-13 18:32:14 +02:00
<?php
namespace Friendica\Module;
use Friendica\BaseModule;
use Friendica\Network\Probe;
/**
* Redirects to another URL based on the parameter 'addr'
*/
2018-10-13 19:00:44 +02:00
class Acctlink extends BaseModule
2018-10-13 18:32:14 +02:00
{
public static function content()
{
$addr = defaults($_REQUEST, 'addr', false);
if ($addr) {
$url = defaults(Probe::uri($addr), 'url', false);
if ($url) {
goaway($url);
2018-10-13 19:00:44 +02:00
exit();
2018-10-13 18:32:14 +02:00
}
}
}
}