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 8101111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:54:21+00:00 2026-06-05T22:54:21+00:00

I have built a local DVD Database using Codeigniter, With film names etc in.

  • 0

I have built a local DVD Database using Codeigniter, With film names etc in. What I am looking to do is load in more data for the film from this IMDB API.

However I am getting the following error :

A PHP Error was encountered

Severity: Warning

Message: file_get_contents(http://www.imdbapi.com/?i=&t=2 Fast 2 Furious) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request

Filename: controllers/dvd.php

Line Number: 92

Copying this URI into an address bar returns the json data, But when loading in my page it gives me that error.

It is worth noting I am running on a localhost this particular site. As I am just familiarising myself with Codeigniter.

My code is….

            // Send Query To IMDB Api

        $film_q = $film_name[0]->title;
        $imdb_uri = "http://www.imdbapi.com/?i=&t=$film_q";
        $json = file_get_contents($imdb_uri);
        $json = json_decode($json);

        print_r($json);

EDIT : Looking further into this. Single word film names seem to load in ok, So I’m assuming I need to someway drill down a “+” into the spaces?

  • 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-05T22:54:25+00:00Added an answer on June 5, 2026 at 10:54 pm

    try urlencode():

     $film_q   = urlencode($film_name[0]->title);
     $imdb_uri = "http://www.imdbapi.com/?i=&t=$film_q";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a WP7.1 application that uses a local database. I used sqlmetal
I have some library files built using JNI in the directory /usr/local/lib/. If i
I have tested a web application I have built using MVC 2 on local
I have build a webapplication using ASP.NET MVC and JQuery. On my local machine
So far I have been using the WebSite Administration Tool built in Visual Studio
i have built (locally) a silverlight website. It uses a mysql database (had to
I want to build mod_wsgi against a Python which I have built myself from
I have built a small web application in asp.net c# in VS 2010 using
I have successfully built ViennaCL using cmake . and make and run some of
I have a local server running on port 6868. Technically it's node.js-driven micro-site built

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.