I am thinking of writing a php script that when given a url will parse certain download links and then using the results from the parsing to then scrape those results for a specific link. basically the script will need to go 2 links deep. I was wondering how i would approach this.
Screen scrapping
Collapse
X
-
Well, high level, what you would do is- Get HTML source for link
- Scan source for links
- Repeat 1 and 2 with that array of links
- Repeat 1 and 2 with the array generated from that array of links
Just be aware that this is pretty much O(n*m) time. If each page has 10 links then you are looking at downloading 111 pages of data.
Comment