/apps/myApp/profile.php?user="> * * '* but can also use complex database queries to generate the webfinger result **/ // calculate the documentroot // modified version of the one in lib/base.php that takes the .well-known symlink into account /*$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']); $SERVERROOT=str_replace("\\",'/',dirname(dirname(dirname(dirname(__FILE__))))); $SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT)); $WEBROOT=substr($SUBURI,0,-34); */ require_once('../../lib/base.php'); $id = $_GET['q']; if($_GET['q']) { $bits = explode('@', $_GET['q']); $userName = $bits[0]; } else { $id = ''; $userName = ''; } if(substr($userName, 0, 5) == 'acct:') { $userName = substr($userName, 5); } if(isset($_SERVER['HTTPS'])) { $baseAddress = 'https://'; } else { $baseAddress = 'http://'; } $baseAddress .= $_SERVER['SERVER_NAME'].OC::$WEBROOT; define('WF_USER', $userName); define('WF_ADDRESS', $id); define('WF_ROOT', $baseAddress); echo "<"; ?> ?xml version="1.0" encoding="UTF-8"?> acct: