stealing images from IMDB
Posted: November 8th, 2008, 23:12
Im trying to write a movie archive scripty thing in php.
i have got it pulling lots of details from imdb when given a film title, however getting the poster images is proving fiddly.
This works, kinda:
for example, it returns:
on sky blue.
All i want it to return is the image source:
Anyone know how i can get it to do this?
i have got it pulling lots of details from imdb when given a film title, however getting the poster images is proving fiddly.
This works, kinda:
Code: Select all
$this->poster = trim($this->getMatch('|<div class="photo">(.*)</div>|Uis', $imdb_content));
Code: Select all
<a name="poster" href="/rg/action-box-title/primary-photo/media/rm2762448640/tt0092067" title="Tenkû no shiro Rapyuta"><img alt="Tenkû no shiro Rapyuta" title="Tenkû no shiro Rapyuta" src="http://ia.media-imdb.com/images/M/MV5BMTU4MTUyMTc3MV5BMl5BanBnXkFtZTYwOTg4Mzk5._V1._SX98_SY140_.jpg" border="0"></a>
All i want it to return is the image source:
Code: Select all
http://ia.media-imdb.com/images/M/MV5BMTU4MTUyMTc3MV5BMl5BanBnXkFtZTYwOTg4Mzk5._V1._SX98_SY140_.jpg
Anyone know how i can get it to do this?