PHP Web File Grabber
The PHP Web File Grabber is a PHP class that is included in the PHP Web Media Grabber software product item.
It is able to search and grab various files referred by an url and then outputs an array containing the grabbing results.
This sample application uses the grabbing engine provided by the WiseLoop PHP Web Media Grabber to search an url page for various file links by checking its a href tags if contains some given strings (usually extensions that identifies some certain file types), grabs the founded files, and then, displays the array returned by the grabbing engine.
Because it doesn't check the content-type response headers, the PHP Web File Grabber class is recommended to be used if you are sure that the target url hides file resources behind a href tags and the desired files to be grabbed have the correct (common) extensions; for example downloading a list of mp3 files from an url page that has a href links to files ending with .mp3 extension string.
WiseLoop PHP Web File Grabber main features:
- File name filtering: only those files whose name contains the specified strings or extensions will be included in the grabbing results.
- Media size filtering: only those files having the specified size (in bytes) will be included in the grabbing results.
- Media count limiter: number of grabbed files will be limited to a specified value.
- HTML area searching: the grabbing engine is able to search for files only inside a designated HTML area specified by a tag; in this way you can skip grabbing from the start any unwanted files by narrowing the full HTML target page to a smaller area consisting of a tag content; an incomplete tag (tag slice) can be specified also, the tag will auto complete depending on the contextual HTML content.
- Downloading capability: the WiseLoop Web File Grabber is able to download the grabbed files to the local server, so those files can be referred or used as local resources in the future.