Sprijin Bază de date filme (The Movie Database)

Hey, I am new here and trying to utilize themoviedb's API for a project of mine. I have a SQL database of movie titles (I exported a CSV from IMDB and parsed it with PHP and inserted into my db) and I want to query themoviedb and search for the movies with the titles I have in my DB and then grab the poster path data for those movies. The idea at the end for my project, is when a particular movie comes up the poster can also come up since I have the poster path (I'll figure this out later, I just need to know right now how to query the API from within PHP and then how to grab a specific attribute -- in this case poster path)

I have a valid API key, and I can obviously use the "Try it out" feature within the developers section and I could manually insert the poster paths into my DB, but I want to basically run the same search queries from the try it out feature in my PHP code

1 răspuns (pe pagina 1 din 1)

Jump to last post

Hi @amoghs96 What you want to do is certainly possible but I am a little unclear with what you're having problems with.

When you grab a movie (as an example):

https://api.themoviedb.org/3/movie/550?api_key=###

You can see it returns a poster_path of:

/adw6Lq9FiC9zjYEpOqfq03ituwp.jpg

With that in hand, you can make an image request based on the information found in the API documentation. Which just as a simple example looks like:

http://image.tmdb.org/t/p/original/adw6Lq9FiC9zjYEpOqfq03ituwp.jpg

Nu găsiți un film sau un serial? Autentificați-vă pentru a-l crea.

Globale

s focalizează bara de căutare
p deschide meniul profilului
esc închide o fereastră deschisă
? deschide fereastra cu scurtături de la tastatură

Pe paginile media

b mergi înapoi (sau la părinte atunci când este cazul)
e mergi la pagina de editare

Pe paginile sezoanelor filmelor seriale

(săgeată dreapta) mergi la sezonul următor
(săgeată stânga) mergi la sezonul precedent

Pe paginile episoadelor filmelor seriale

(săgeată dreapta) mergi la episodul următor
(săgeată stânga) mergi la episodul precedent

Pe toate paginile de imagini

a deschide fereastra pentru adăugarea de imagini

Pe toate paginile de editare

t deschide selectorul de traduceri
ctrl+ s trimite formularul

Pe paginile de discuții

n crează o discuție nouă
w comută starea de vizionare
p comută publică/privată
c comută închisă/deschisă
a deschide activitatea
r răspunde la discuție
l mergi la ultimul răspuns
ctrl+ enter trimite mesajul
(săgeată dreapta) pagina următoare
(săgeată stânga) pagina precedentă

Setări

Doriți să evaluați sau să adăugați acest articol într-o listă?

Autentificare