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!
Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.
Vous souhaitez évaluer ou ajouter cet élément à une liste ?
Pas encore membre ?
Réponse de Travis Bell
le 9 novembre 2016 à 15h53
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.
Réponse de shubharsekar
le 9 novembre 2016 à 16h58
Hey Travis, Cool! Thank you, I will look into it and get back if I need help.
Thanks!