[Hampshire] A php script to spider media files

Top Page

Reply to this message
Author: Ottavio Caruso
Date:  
To: hampshire
Subject: [Hampshire] A php script to spider media files
Sirs,

I need your help to write a php script that spiders a site for media files.

What I would like to achieve is: given two variables, $URL and $MEDIA,
the script will crawl, starting from $URL and going, say, two or three
level down (or up), all links ending with .$MEDIA and print their url
on screen.

Example: http://www.somesite.com , mpeg

output:

Found http://www.somesite.com/file1.mpeg
Found http://www.somesite.com/file2.mpeg
Found http://www.somesite.com/file3.mpeg
Found http://www.somesite.com/file2.mpeg
Found http://www.anothersite.co.uk/file1.mpeg
Found http://www.anothersite.co.uk/file2.mpeg
Found http://www.anothersite.co.uk/file3.mpeg
Found http://www.anothersite.co.uk/file2.mpeg

Something like that. Is that possible? I haven't touched php for ages.

Thank you.

--
Ottavio Caruso
http://www.pledgebank.com/boycottvista