Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
09-03-2007, 09:34 AM #1
- Join Date
- Jul 2007
- Thanked 0 Times in 0 Posts
Reading certain data from another website
for a type of review site i was wanting to get the average votes for a movies and then display it on my site, the site is imdb, just the number of votes i was trying to get
i have so far:
// IMDB get rating...
$str_text = file_get_contents("http://www.imdb.com/title/tt0373883/");
$pattern = '/(h1|src)=[\'"]/';
preg_match_all($pattern, $str_text, $matches);
<div class="general rating">
<div class="starbar static"><div class="outer"><div class="inner" style="width: 64px"></div></div></div>
<small>(<a href="ratings">323 votes</a>)</small>
09-03-2007, 01:53 PM #2
- Join Date
- Jun 2007
- Perth, Western Australia
- Thanked 58 Times in 57 Posts
If I remember correctly this is illegal unless without permission. Plus it's not recommended as you've got to load 2 websites, which make your visitors wait longer to load, and if I remember reading a review and it said so many viewers leave if the website takes too long to load, and it was a very high percentage, so I suggest you make your own vote database.