PHP JavaScript Grabber
The PHP JavaScript Grabber is a PHP class that is included in the PHP Web Media Grabber software product item.
It is able to search and grab external JavaScript files included by an url and then outputs an array containing the grabbing results.
This sample application searches an url for external JavaScript files by checking its script src tags and their content-type HTTP response headers, grabs them and then displays the array returned by the grabbing engine.
WiseLoop PHP JavaScript Grabber main features:
- JavaScript files search and identification by the HTML content-type response header: the grabbing engine is able to identify beyond the obvious JavaScript resources having the .js file extension - it will find the JavaScript files that have different file extension or no extension at all; the identification is made by checking the server response header when pinging the tested JavaScript file resource.
- Media url name (filename) filtering: only those JavaScript files having or containing in their url names some specified strings will be included in the grabbing results.
- Media size filtering: only those JavaScript files having the specified size (in bytes) will be included in the grabbing results.
- Media count limiter: number of grabbed JavaScript files will be limited to a specified value.
- HTML area searching: the grabbing engine is able to search for JavaScript files only inside a designated HTML area specified by a tag; in this way you can skip grabbing from the start any unwanted JavaScript 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 PHP JavaScript Grabber is able to download the grabbed JavaScript files to the local server, so those scripts can be referred or used as local resources in the future.