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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:18:56+00:00 2026-06-03T16:18:56+00:00

i would like to get the poster image url using php from imdb from

  • 0

i would like to get the poster image url using php from imdb from a search term. For example i have the search term 21 Jump Street and i would like to get back the image ur or only the imdb movie url. With the below code i need only to retrieve the url of the movie from a search term

here is the code i have

<?php

    include("simple_html_dom.php");

//url to imdb page
$url = 'hereistheurliwanttogetfromsearch';

//get the page content
$imdb_content = file_get_contents($url);

$html = str_get_html($imdb_content);

$name = $html->find('title',0)->plaintext;

$director = $html->find('a[itemprop="director"]',0)->innertext;

$plot = $html->find('p[itemprop="description"]',0)->innertext;

$release_date = $html->find('time[itemprop="datePublished"]',0)->innertext;

$mpaa = $html->find('span[itemprop="contentRating"]',0)->innertext;

$run_time = $html->find('time[itemprop="duration"]',0)->innertext;

$img = $html->find('img[itemprop="image"]',0)->src;

$content = "";

//build content
$content.= '<h2>Film</h2><p>'.$name.'</p>';
$content.= '<h2>Director</h2><p>'.$director.'</p>';
$content.= '<h2>Plot</h2><p>'.$plot.'</p>';
$content.= '<h2>Release Date</h2><p>'.$release_date.'</p>';
$content.= '<h2>MPAA</h2><p>'.$mpaa.'</p>';
$content.= '<h2>Run Time</h2><p>'.$run_time.'</p>';
$content.= '<h2>Full Details</h2><p><a href="'.$url.'" rel="nofollow">'.$url.'</a></p>';
$content.= '<img src="'.$img.'" />';

echo $content;

?>
  • 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-03T16:18:57+00:00Added an answer on June 3, 2026 at 4:18 pm

    Using the API that Kasper Mackenhauer Jacobsenless suggested here’s a fuller answer:

    $url = 'http://www.imdbapi.com/?i=&t=21+jump+street';
    
    $json_response = file_get_contents($url);
    $object_response = json_decode($json_response);
    
    if(!is_null($object_response) && isset($object_response->Poster)) {
            $poster_url = $object_response->Poster;
            echo $poster_url."\n";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to get the AssemblyCompany attribute from a WinForm project inside of
I would like to get the first item from a list matching a condition.
I am using the simple Google API to display search results. I would like
I would like to get the dimensions (coordinates) for all the HTML elements of
I would like to get the most out of working in cch or tcsh
I would like to get a reference to all objects in the Java heap,
I would like to get some information on list of points that needs to
I would like to get contents of some stream or project I can find
I would like to get the final SQL query, with parameter values bound (replaced)
I would like to get the XAML source of a WPF Window (MainWindow). Clicking

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.