Soporte de 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 respuesta (en la página 1 de 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

¿No encuentras una película o serie? Inicia sesión para crearla:

Global

s centrar la barra de búsqueda
p abrir menú de perfil
esc cierra una ventana abierta
? abrir la ventana de atajos del teclado

En las páginas multimedia

b retrocede (o a padre cuando sea aplicable)
e ir a la página de edición

En las páginas de temporada de televisión

(flecha derecha) ir a la temporada siguiente
(flecha izquierda) ir a la temporada anterior

En las páginas de episodio de televisión

(flecha derecha) ir al episodio siguiente
(flecha izquierda) ir al episodio anterior

En todas las páginas de imágenes

a abrir la ventana de añadir imagen

En todas las páginas de edición

t abrir la sección de traducción
ctrl+ s enviar formulario

En las páginas de debate

n crear nuevo debate
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder al debate
l ir a la última respuesta
ctrl+ enter enviar tu mensaje
(flecha derecha) página siguiente
(flecha izquierda) página anterior

Configuraciones

¿Quieres puntuar o añadir este elemento a una lista?

Iniciar sesión