This is what I do to get details
$query = "Doctor%20Strange";
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$urltmdb = "https://api.themoviedb.org/3/search/movie?query=".$query."&language=en-US&api_key=XXXXXXX";
curl_setopt_array($curl, array(
CURLOPT_URL => $urltmdb,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "{}",
));
but when I try to access the image value in the return array I dont get the full image link-->I receive only the image name for example:
[poster_path] => /xfWac8MTYDxujaxgPVcRD9yZaul.jpg
Thus when I try to display it shows no image at all.
Can anyone help me on this? Thanks!
Kan ’n rolprent of TV-program nie vind nie? Teken aan om dit te skep.
Wil u hierdie item gradeer of tot ’n lys toevoeg?
Nie ’n lid nie?
Antwoord deur Travis Bell
op 9 November 2016 om 3:53 NM
Hi there,
Please consult the image documentation as it details how to build image URLs. And since you're passing along a language parameter, I'd recommend reading through this document as well.
Cheers.
Antwoord deur shubharsekar
op 9 November 2016 om 4:58 NM
Hey Travis, Cool! Thank you, I will look into it and get back if I need help.
Thanks!