תמיכת The Movie Database

Hi, Iam new here and i was wondering if the API is always so slow or if i had made a mistake. I have written a little php script with 10 movieID`s which loads the Covers of the Movies and it takes about 10 sek. to load... is this normal or am i doing something wrong? Here is my Script:

<?php
$api = "MyKey";
$url = "https://api.themoviedb.org/3/";
$Filme = ['27205','242582','1124','68718','77','600','49047','680','273248'];
$x = 0;
while($x < count($Filme)){
    $json = file_get_contents($url."movie/".$Filme[$x]."?api_key=".$api."&language=de");
    $daten = json_decode($json, TRUE);
    echo "";
    $x++;
    }
?>

I tried it on my local machine and on my web server in Frankfurt-Germany Thanks in advance

תגובה 1 (בדף 1 מתוך 1)

Jump to last post

Hi @JürgenTrings,

I would say that it is certainly not normal but I can't really help you without having you separate the requests. api.themoviedb.org and image.tmdb.org are on completely different networks. If you can run through the ids and not grab images, it should help you understand which one is being slow.

Another thing to mention is to make sure you're using a persistent HTTP connection. I ran through some examples of the difference this makes with another user here if you're interested.

Cheers.

.לא מצאת סרט או סדרה? היכנס כדי ליצור אותם

עולמי

s התמקד בשורת החיפוש
p פתח תפריט פרופיל
esc סגור חלון פתוח
? פתח חלון קיצורי דרך של מקלדת

בדפי מדיה

b לך חזרה (או אל הורה אם ישים)
e לך אל דף עריכה

בדפי עונות

(חץ ימני) לך אל העונה הבאה
(חץ שמאלי) לך אל העונה הקודמת

בדפי סדרות

(חץ ימני) לך אל הפרק הבא
(חץ שמאלי) לך אל הפרק הקודם

בכל דפי תמונה

a פתח חלון הוספת תמונה

בכל דפי עריכה

t פתח בוחר תרגום
ctrl+ s הגש טופס

בדפי דיון

n צור דיון חדש
w עורר מעמד צפייה
p עורר ציבורי/פרטי
c עורר סגירה/פתיחה
a פתח פעילות
r השב אל דיון
l לך אל תשובה אחרונה
ctrl+ enter הגש את הודעתך
(חץ ימני) הדף הבא
(חץ שמאלי) הדף הקודם

הגדרות

?רוצה לדרג או להוסיף פריט אל רשימה

היכנס