I have this
- Code: Select all
$client = new IXR_Client('http://api.opensubtitles.org/xml-rpc');
//$client->debug = true;
if ($client->query("SearchSubtitles", $myFile1 , array(array('query'=>$lines[1], 'sublanguageid'=>'por')) )) {
$response = $client->getResponse(); print_r($response) ;
Which outputs all the subtitles matching the query
(i'm trying to search for a specific one, The.Hunger.Games.RERIP.720p.BluRay.X264-BLOW, but the server returns me all The Hunger Games subtitles for that language, i think)
So after that i try this, for instance:
- Code: Select all
for ($i=0; $response[$i]["UserID"] != 0; $i++) { echo $response[b]["data"][/b][$i]["SubFileName"]; }
(line 29)
Result:
Notice: Undefined offset: 0 in C:\Users\User\Desktop\xampp\htdocs\index2.php on line 29
Any ideas?
For now solved adding the "data" as a 'dimension of the array'


