If you're using PHP then you should be able to adapt Aquanuke's Amazon Top Ten script to do the job for you.
Have been in contact with the guys at this site and they said it is OK for me to copy the US and UK Box Office charts for my site.
However, they don't have the time to set up anything from their end to automate the process.
It would be time-consuming for me to update the charts manually on my site by cutting-and-pasting from their site. Therefore I was wondering if any of the gurus out there knew of a method I could use to copy their charts to my site. Is there any kind of script I could use?
A million thanks.
If you're using PHP then you should be able to adapt Aquanuke's Amazon Top Ten script to do the job for you.
Those who can do, those who can't talk about it
That's a good idea, Ian. Am useless at PHP, but I will try to fiddle with Aquanuke's script.
Will report back to let you know how it goes.
Thanks![]()
Nadeem,
hopefully this should work for you.
DavidPHP Code:<?php
$handle = fopen("http://fantasyfilmleague.com/", "rb");
$contents = '';
while (!feof($handle)) {
$contents .= fread($handle, 8192);
}
fclose($handle);
preg_match_all('/[?<=<h2>.. Box Office<\/h2>(.*)]<ol>(.*)<\/ol>/sUi', $contents, $out);
$uk_boxoffice=str_replace("/film.php","http://fantasyfilmleague.com/film.php",$out[0][0]);
$us_boxoffice=str_replace("/film.php","http://fantasyfilmleague.com/film.php",$out[0][1]);
echo "<h2>UK Box Office</h2>".$uk_boxoffice;
echo "<hr>";
echo "<h2>US Box Office</h2>".$us_boxoffice;
?>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks