Unable to connect to database'; die($ex->getMessage()); } Remote::setUrl($config['remote_url']); Remote::setSecret($config['remote_secret']); if(empty($_COOKIE['mc_random'])) { $sVerification = Utils::generatePassKey(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'));