Suport de The Movie Database

i am new to php so there might be a comman sens thing to do like create a token or cookie or something and i didnt do but my website work flowlessliy for like 2 minute or something then it starts giving me error 404 even tho i paste the url on the browser and i get response but in my website it stops i dont know why heres a example of my code edit: i cant submit my code am getting error 403 in the console

2 resposta (a les pàgines 1 de 1)

Jump to last post

this is the first one

Error occurred: Client error:

GET https://api.themoviedb.org/3/movie/101299?api_key=&append_to_response=credits

resulted in a 404 Not Found response:

Fatal error
: Uncaught GuzzleHttp\Exception\ClientException: Client error: `GET https://api.themoviedb.org/3/movie/882598/images?api_key=&language=en-US&include_image_language=en

resulted in a 404 Not Found

response:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found (truncated...) in C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php:113 Stack trace: #0 C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\guzzle\src\Middleware.php(72): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response), NULL, Array, NULL) #1 C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\promises\src\Promise.php(209): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\promises\src\Promise.php(158): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL) #3 C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\promises\src\TaskQueue.php(52): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #4 C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\promises\src\Promise.php(251): GuzzleHttp\Promise\TaskQueue->run(true) #5 C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\promises\src\Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn() #6 C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\promises\src\Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending() #7 C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\promises\src\Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList() #8 C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\promises\src\Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending() #9 C:\xampp\htdocs\pleura\Back_End\tmdb_project\vendor\guzzlehttp\guzzle\src\Client.php(189): GuzzleHttp\Promise\Promise->wait() #10 C:\xampp\htdocs\pleura\Back_End\browse.php(51): GuzzleHttp\Client->request('GET', 'https://api.the...', Array) #11 C:\xampp\htdocs\pleura\Back_End\library.php(50): include('C:\\xampp\\htdocs...') #12 {main} thrown in

Hi @benni1233,

If you're having some specific issues with a language or library I usually recommend heading over to Stack Overflow since you can target people with that specific knowledge.

The requests themselves are fine:

Request

curl -v "https://api.themoviedb.org/3/movie/882598/images?api_key=###&language=en-US&include_image_language=en"

*   Trying [2600:9000:20be:8600:c:174a:c400:93a1]:443...
* Connected to api.themoviedb.org (2600:9000:20be:8600:c:174a:c400:93a1) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=*.themoviedb.org
*  start date: Aug 20 00:00:00 2023 GMT
*  expire date: Sep 17 23:59:59 2024 GMT
*  subjectAltName: host "api.themoviedb.org" matched cert's "*.themoviedb.org"
*  issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M03
*  SSL certificate verify ok.
* using HTTP/2
* h2h3 [:method: GET]
* h2h3 [:path: /3/movie/882598/images?api_key=###&language=en-US&include_image_language=en]
* h2h3 [:scheme: https]
* h2h3 [:authority: api.themoviedb.org]
* h2h3 [user-agent: curl/7.88.1]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x7f798b00a800)
> GET /3/movie/882598/images?api_key=###&language=en-US&include_image_language=en HTTP/2
> Host: api.themoviedb.org
> user-agent: curl/7.88.1
> accept: */*
>
< HTTP/2 200
< content-type: application/json;charset=utf-8
< content-length: 5415
< date: Mon, 28 Aug 2023 16:37:50 GMT
< server: openresty
< cache-control: public, max-age=28228
< x-memc: HIT
< x-memc-key: beed21854909ad2aef2b7d8968d8e67a
< x-memc-age: 2930
< x-memc-expires: 21630
< etag: W/"6f16e3d76624f67f81cfa24de8406ba0"
< vary: Accept-Encoding
< x-cache: Miss from cloudfront
< via: 1.1 2750b94b402c92287d764b5fa115a042.cloudfront.net (CloudFront)
< x-amz-cf-pop: SEA19-C3
< alt-svc: h3=":443"; ma=86400
< x-amz-cf-id: blqbzQ8X1B4wwB4JUKEBARo0r3ykRon42ItIf9LcvFxwIgfIXytNPA==
< vary: Origin
<
* Connection #0 to host api.themoviedb.org left intact

Response

{
    "backdrops": [
        {
            "aspect_ratio": 1.778,
            "height": 2160,
            "iso_639_1": "en",
            "file_path": "/xpdd8I17UX8EY9srHhRTg6L42LN.jpg",
            "vote_average": 5.246,
            "vote_count": 2,
            "width": 3840
        },
        ...
    ],
    "id": 882598,
    "logos": [
        {
            "aspect_ratio": 3.066,
            "height": 363,
            "iso_639_1": "en",
            "file_path": "/8H8V8cM9oNibrENULujZgHJU1Aw.png",
            "vote_average": 0,
            "vote_count": 0,
            "width": 1113
        },
        ...
    ],
    "posters": [
        {
            "aspect_ratio": 0.667,
            "height": 3000,
            "iso_639_1": "en",
            "file_path": "/aPqcQwu4VGEewPhagWNncDbJ9Xp.jpg",
            "vote_average": 5.22,
            "vote_count": 13,
            "width": 2000
        },
        {
            "aspect_ratio": 0.667,
            "height": 3000,
            "iso_639_1": "en",
            "file_path": "/67Myda9zANAnlS54rRjQF4dHNNG.jpg",
            "vote_average": 5.708,
            "vote_count": 9,
            "width": 2000
        },
        ...
    ]
}

No trobeu una pel·lícula o una sèrie? Inicieu la sessió per a crear-la.

Global

s centra la barra de cerca
p obre el menú del perfil
esc tanca una finestra oberta
? obre la finestra de dreceres de teclat

A les pàgines de materials

b torna enrere (o la superior quan sigui aplicable)
e ves a la pàgina d’edició

A les pàgines de temporades

(fletxa dreta) ves a la temporada següent
(fletxa esquerra) ves a la temporada anterior

A les pàgines d'episodis

(fletxa dreta) ves a l'episodi següent
(fletxa esquerra) ves a l'episodi anterior

A totes les pàgines d'imatges

a obre la finestra d'afegir imatges

A totes les pàgines d'edició

t obre el selector de traducció
ctrl+ s envia el formulari

A les pàgines de debat

n crea un debat nou
w canvia l'estat de visualització
p canvia públic/privat
c tanca o obre
a obre activitat
r resposta al debat
l ves a la darrera resposta
ctrl+ enter envieu el vostre missatge
(fletxa dreta) pàgina següent
(fletxa esquerra) pàgina anterior

Configuracions

Desitgeu valorar o afegir aquest element a una llista?

Inicieu la sessió