Tmdb Client Error: {"success":false,"status_code":11,"status_message":"Internal error: Something went wrong, contact TMDb.","combined_credits":{"cast":[{"adult":false,"backdrop_path":null,"genre_ids":[80],"id":330080,"original_language":"en","original_title":"The Marked One","overview":"William Lucas plays a lorry driver who is recently out of prison. He becomes a target when it s discovered that he knows where he can find plates for making forged banknotes.","popularity":0.676,"poster_path":"/f9iNox7YIpGwj1sykiPRFUHTdvT.jpg","release_date":"1963-01-01","title":"The Marked One","video":false,"vote_average":6.8,"vote_count":6,"character":"Wanda","credit_id":"5500a83ac3a3685b9b001b69","order":6,"media_type":"movie"},{"adult":false,"backdrop_path":"/tdcgfMk7nt42b1m2UBrZUAh0nBl.jpg","genre_ids":[27,878],"id":43023,"original_language":"en","original_title":"Konga","overview":"Dr. Decker returns from Africa after a year, presumed dead. In that year, he discovered a way of growing plants and animals to an enormous size. He brings back a baby chimpanzee to test out his theory. As he has many enemies at home, he decides to use his chimp, 'Konga', to 'get rid of them'. Then Konga grows to gigantic proportions and wreaks havoc all over London!","popularity":4.253,"poster_path":"/o44fhVZ3539Brk66cGzrXyfrjfL.jpg","release_date":"1961-01-01","title":"Konga","video":false,"vote_average":4.2,"vote_count":35,"character":"Mary","credit_id":"5f1c3edf223a8b0036eeefae","order":12,"media_type":"movie"},{"adult":false,"backdrop_path":"/cR5aCflKo4z0qSYUXGSIej3ki04.jpg","genre_ids":[80,9648],"id":95345,"original_language":"en","original_title":"The Girl Hunters","overview":"Mickey Spillane plays his own creation, street-thug-turned-PI Mike Hammer, in this 1963 adaptation of his novel. The film opens with Hammer on the downside of a years-long bender, scooped out of the gutter by a bitter cop intent on prying information from a dying man. Inspired to clean up his act by the secrets he hears, Hammer hits the streets on a personal crusade to find the love of his life. Future Bond girl Shirley Earton costars as a glamorous society widow who goes slumming with Hammer.--Sean Axmaker","popularity":1.986,"poster_path":"/wdtlR85mBI4ZcNrAqmvNsFiAd4T.jpg","release_date":"1963-06-01","title":"The Girl Hunters","video":false,"vote_average":5.7,"vote_count":18,"character":"","credit_id":"6068a6d33a96500057de3dc7","order":12,"media_type":"movie"},{"adult":false,"backdrop_path":"/vPNv21dct95kdzK4Gc7YA2gkzT1.jpg","genre_ids":[10759],"id":14868,"origin_country":["GB"],"original_language":"en","original_name":"Sir Francis Drake","overview":"Sir Francis Drake was a British adventure television series starring Terence Morgan as Sir Francis Drake, commander of the sailing ship the Golden Hind. As well as battles at sea, sword fights, the series also deals with intrigue at Elizabeth's court, often caused by Spaniard, Mendoza.","popularity":15.83,"poster_path":"/qKLVDbaQtoMdRXWWLy1wZNnIuve.jpg","first_air_date":"1961-11-12","name":"Sir Francis Drake","vote_average":4.0,"vote_count":5,"character":"Zaharra","credit_id":"61cd7b60db72c000414bbad9","episode_count":1,"media_type":"tv"}],"crew":[]}}
96 'Content-Type' => 'application/json;charset=utf-8',
97 'Authorization' => sprintf('Bearer %s', Configurator::$instance->get('tmdb'))
98 ];
99
100 // Append language preference to headers to avoid adult content
101 $headers['Accept-Language'] = 'en-US'; // Example: Set language preference to English
102
103 // Make the GET request with headers
104 $resp = EasyCurl::setHeaders($headers)->get(...$args);
105
106 // Check if response status is not 200 OK
107 if ($resp->getStatus() != 200) {
108 throw new TmdbClientException('Tmdb Client Error: ' . $resp->getBody(), $resp->getStatus());
109 }
110
111 // Check for adult content in response (assuming TMDB API supports such filtering)
112 $jsonResponse = json_decode($resp->getBody(), true);
113
114
115 return $resp;
116 }
117
118
119 public function getGenre(): array
120 {
121 return $this->request('genre/' . $this->getType() . '/list')['genres'] ?? [];