candyman 6 Posted November 9, 2014 Posted November 9, 2014 hi im trying to get http://mediabrowser.tv/community/index.php?/topic/7196-data-build-tool-for-external-database/ working with the latest build of MBS, I have the logon and Authorisation working along with request to http://[sERVER]:8096/mediabrowser/Genres?UserId=[uSERID]&IncludeItemTypes= Movie&format=json BUT request to http://[sERVER]:8096/mediabrowser/Persons?UserId=[uSERID]&IncludeItemTypes=Movie&format=json FAIL with file_get_contents(http:/[sERVER]:8096/mediabrowser/Persons?UserId=[uSERID]&IncludeItemTypes=Movie&Recursive=true&format=json): failed to open stream: HTTP request failed! I use the code below for both request. function mb3getdata($dataurl, $resp ){ $URL = $dataurl; $UID = guid(); $opts2 = array('http' => array( 'header' => 'Content-type: application/x-www-form-urlencoded', 'header' => 'Authorization=MediaBrowser UserId="'. $userHash.'", Client="Android", Device="PHP DataBase Script", DeviceId="'.$UID.'", Version="1.0.0.0"', 'header' => 'X-MediaBrowser-Token: '.$resp, 'method' => 'GET', 'ignore_errors' => true, ) ); $context = stream_context_create($opts2); $result2 = file_get_contents($URL, false, $context); return $result2; } anyone able to shed any light on what could be wrong rgds Andrew
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now