function getAppLoginUrl($siteid = null, $ip = null, $js = null) { $url = WindowsLiveLogin::getSecureUrl(); $url .= 'wapplogin.srf?app=' . WindowsLiveLogin::getAppVerifier($ip); $url .= '&alg=' . WindowsLiveLogin::getSecurityAlgorithm(); $url .= $siteid ? "&id={$siteid}" : ''; $url .= $js ? '&js=1' : ''; return $url; }