예제 #1
0
 /**
 myPlex server function to grant plexpass access dynamically.
 Used for testing purpose only.
 */
 public static function users($params)
 {
     if ($params[0] == 'sign_in.xml') {
         $curlopts = array();
         $headers = array();
         $res = self::myPlexRequest('users/sign_in.xml', $curlopts, $headers, true);
         foreach ($res['headers'] as $header) {
             header($header);
         }
         if ($res['status'] == '201') {
             Plex_XML_Data::setMyPlexSubscription($res['xml']);
             self::apiOutput($res['xml']->asXML());
         } else {
             self::createError($res['status']);
         }
     }
 }