Hi, I'm trying to make an plugin that grab the movie info from imdb and displays them on a page.
The problem is that I can't get the poster.
This is my code:
In the "View page source" I see only this:
<img height="170" width="150" />
The imdb page source html for poster is this:
What is the problem?
The problem is that I can't get the poster.
This is my code:
PHP Code:
$url = file_get_contents("http://www.imdb.com/title/tt1980209/");
$poster = explode('<img height="317" width="214" src="', $url );
$poster = explode('" itemprop="image" />', $poster[1]);
$picture = '<img height="170" width="150" src="'.$poster[0].'" />';
echo $picture;
<img height="170" width="150" />
The imdb page source html for poster is this:
Code:
<img height="317" width="214" alt="Pain & Gain (2013) Poster" title="Pain & Gain (2013) Poster" src="http://ia.media-imdb.com/images/M/MV5BMTU0NDE5NTU0OV5BMl5BanBnXkFtZTcwMzI1OTMzOQ@@._V1_SY317_CR0,0,214,317_.jpg" itemprop="image" />
Comment