Nicky, what is any way is unethical about it? I am trying to link to people's websites reviews about certain films. I just want an easier way to get the correct url of the relevant review than tralling through 15 of the websites, this is the only way i came up with.
Ok, i understand it takes a while for it to do it, but it will be quicker than me. I have about 500 movies to find reviews of so the plan was to put them all in the database, press go and leave it for 24 hours going (a cron job probably) and come back and check through them.
So i get the results as a webpage, fine and now i just need to parse them. I can look that bit up i am sure.
So how do i get the webpage into a variable. I assume that is what i do? I have been trying to find this and the best bit i came up with is the chapter PHP connectivity in Professional PHP programming.
It is something like
Code:
$fd = fopen("http://www.moviereview.com/search.php?term=alien","r");
if ($fd) {
fpassthru{$fd);
}
?>
is that it? does $fd contain the code of the webpage or am i completly not understanding it? will it return the html code which i can then parse through (i can work that bit out ok). or am i missing it?
There is a longer script given on page 438-440 but i don't really understand it,i think it is to do with proxy servers. Anyway, does it give the same result at the end of page 440, does $fp contain the html code of the page, is that what fpassthru does?
Thanks for help on this.
Bookmarks