Unable to connect to database'; die($ex->getMessage()); } $remote = new RemoteV2($config['remotev2_url'], $config['remotev2_secret']); if(PHP_SAPI !== 'cli') { if(empty($_COOKIE['mc_random'])) { $sVerification = XString::random(32); setcookie('mc_random', $sVerification, strtotime('1 day'), '/', $_SERVER['HTTP_HOST']); } else $sVerification = (string)filter_input(INPUT_COOKIE, 'mc_random'); $sVerification = hash('sha256', $sVerification); // replace this with id.flashii.net shit $userInfo = ChatAuth::attempt($db, $config['chat_endpoint'], $config['chat_secret'], (string)filter_input(INPUT_COOKIE, 'msz_auth')); }