Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9182105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:28:54+00:00 2026-06-17T18:28:54+00:00

I need some help with the movie db api. I constantly get a connection

  • 0

I need some help with the movie db api. I constantly get a connection timed out error. Below is my code, I’m trying to just output the raw json respone so I can work my way from there.

$header_opt = array(
  'http'=>array(
  'method'=>"GET",
  'header'=>"Accept: application/json\r\n" .
            "Content-Type: application/json\r\n"
          )
);

$headers = stream_context_create($header_opt);

$rawjson = file_get_contents('http://api.themoviedb.org/3/movie/tt0076759?api_key=myapikey', false, $headers);

$cleansjon = json_decode($rawjson);

echo $cleansjon;

And this is the error I get.

Warning: filegetcontents(http://api.themoviedb.org/3/movie/tt0076759?api_key=myapikey) [function.file-get-contents]: failed to open stream: Connection timed out in /*///*/public_html/index.php on line 11

I hope that someone can help me with this.

Edit: Added HAR response

{
  "log": {
    "version": "1.2",
    "creator": {
      "name": "WebInspector",
      "version": "537.20"
    },
    "pages": [
      {
        "startedDateTime": "2013-01-27T09:51:02.534Z",
        "id": "page_1",
        "title": "http://*MyWebsite*/tmdb.php",
        "pageTimings": {
          "onContentLoad": 60636,
          "onLoad": 60635
        }
      }
    ],
"entries": [
  {
    "startedDateTime": "2013-01-27T09:51:02.534Z",
    "time": 60197,
    "request": {
      "method": "GET",
      "url": "http://*MyWebsite*/tmdb.php",
      "httpVersion": "HTTP/1.1",
      "headers": [
        {
          "name": "DNT",
          "value": "1"
        },
        {
          "name": "Accept-Encoding",
          "value": "gzip,deflate,sdch"
        },
        {
          "name": "Host",
          "value": "*MyHost*"
        },
        {
          "name": "Accept-Language",
          "value": "nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4"
        },
        {
          "name": "User-Agent",
          "value": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.20 (KHTML, like Gecko) Chrome/25.0.1328.0 Safari/537.20"
        },
        {
          "name": "Accept",
          "value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
        },
        {
          "name": "Cache-Control",
          "value": "max-age=0"
        },
        {
          "name": "Connection",
          "value": "keep-alive"
        },
        {
          "name": "Accept-Charset",
          "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
        }
      ],
      "queryString": [],
      "cookies": [],
      "headersSize": 443,
      "bodySize": 0
    },
    "response": {
      "status": 200,
      "statusText": "OK",
      "httpVersion": "HTTP/1.1",
      "headers": [
        {
          "name": "Date",
          "value": "Sun, 27 Jan 2013 09:51:02 GMT"
        },
        {
          "name": "Content-Encoding",
          "value": "gzip"
        },
        {
          "name": "Server",
          "value": "Apache/2"
        },
        {
          "name": "Vary",
          "value": "Accept-Encoding,User-Agent"
        },
        {
          "name": "Content-Type",
          "value": "text/html"
        },
        {
          "name": "Connection",
          "value": "Keep-Alive"
        },
        {
          "name": "Keep-Alive",
          "value": "timeout=1, max=100"
        },
        {
          "name": "Content-Length",
          "value": "260"
        }
      ],
      "cookies": [],
      "content": {
        "size": 342,
        "mimeType": "text/html",
        "compression": 82
      },
      "redirectURL": "",
      "headersSize": 234,
      "bodySize": 260
    },
    "cache": {},
    "timings": {
      "blocked": 0,
      "dns": 13,
      "connect": 29,
      "send": 0,
      "wait": 60147,
      "receive": 5,
      "ssl": -1
    },
    "pageref": "page_1"
  }
   ]
  }
 }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:28:55+00:00Added an answer on June 17, 2026 at 6:28 pm

    Maybe there is no problem at all. Your application is trying to connect to a server and gets a timeout error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help figuring out what I'm doing wrong here. I am trying
I need some help a query. For each movie in my database that has
Need some help assigning a mouseover event to display some icons that start out
need some help figuring this out. My function: function cleanDatabase() { $allowedTime = $this->time
I need some help on figuring out a way to store my data that
I need some help to implement this roll over / out effect. This is
I am trying to understand inheritance and I need some help building two classes.
I am trying to do a seasaw effect with Jquery, but need some help
Need some help... I have jasperserver 4.1 installed on my ubuntu. It runs via
Need some help with Activerecord Querying in a has_many :through association. Model: Job class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.