Open($userInfo); $sessionId = $site->GetSite()->CreateSession(); } catch (MgException $e) { echo $e->GetMessage(); } ?>