array( 'verify_peer' => false, 'verify_peer_name' => false ))); libxml_set_streams_context($context); $url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://127.0.0.1:$_SERVER[SERVER_PORT]/cgi-bin/authLogin.cgi?sid=".$_COOKIE['NAS_SID']; $xml = simplexml_load_file($url); unset($context); if ( (false === $xml) || !isset($xml->authPassed) || !isset($xml->username) || !isset($xml->isAdmin) ) { die('Unable to retrieve xml authentication info from your qnap device.'); } if ( !(bool)(int)$xml->authPassed[0] || !(bool)(int)$xml->isAdmin[0] || (string)$xml->username[0] !== $_COOKIE['NAS_USER']) { die('No authentic session id of an admin user!'); } } else { die('Not logged in!'); } $ContributorsManual = array( array( 'login' => 'RoonLabs', 'avatar_url' => 'https://avatars2.githubusercontent.com/u/15744118?v=4', 'html_url' => 'https://github.com/RoonLabs', 'description' => 'For the continuous support and help.' ), array( 'login' => 'QNAP', 'avatar_url' => 'https://www.qnap.com/i/images/q_logo.jpg', 'html_url' => 'https://www.qnap.com', 'description' => '' ), array( 'login' => 'marianoglas', 'avatar_url' => 'https://avatars0.githubusercontent.com/u/5198307?v=4', 'html_url' => 'https://github.com/marianoglas', 'description' => 'For your help with the API and AJAX.' ), array( 'login' => 'Ignaas Vanden Poel', 'description' => 'Dutch translation' ), array( 'login' => 'Aldewin Bedoya', 'description' => 'Spanish translation' ) ); ?>