The Movie Database-ondersteuning

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!

2 antwoorde (op blad 1 van 1)

Jump to last post

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.

Hey Travis, Cool! Thank you, I will look into it and get back if I need help.

Thanks!

Kan ’n rolprent of TV-program nie vind nie? Teken aan om dit te skep.

Globaal

s fokus op soekbalk
p open profielkieslys
esc sluit ’n oop venster
? open sneltoetsvenster

Op mediablaaie

b gaan terug (na ouer waar van toepassing)
e gaan na wysigblad

Op TV-seisoenblaaie

(regterpyl) gaan na volgende seisoen
(linkerpyl) gaan na vorige seisoen

Op TV-episodeblaaie

(regterpyl) gaan na volgende episode
(linkerpyl) gaan na vorige episode

Op alle beeldblaaie

a open beeldtoevoegvenster

Op alle wysigingsblaaie

t open vertaalkieser
ctrl+ s dien form in

Op besprekingsblaaie

n skep nuwe bespreking
w tokkel kykstatus
p tokkel openbaar/privaat
c tokkel maak oop/toe
a open aktiwiteit
r reageer op bespreking
l gaan na laaste reaksie
ctrl+ enter dien u boodskap in
(regterpyl) volgende blad
(linkerpyl) vorige blad

Instellings

Wil u hierdie item gradeer of tot ’n lys toevoeg?

Teken aan