WiseLoop PHP Web Media Grabber 3.1.1
Advanced PHP web resources extractor
wlWmgContentTypeGrabber Class Reference
Inheritance diagram for wlWmgContentTypeGrabber:

Public Member Functions

 __construct ($url, $contentType)

Static Public Member Functions

static getContentTypes ()

Data Fields

const CONTENT_TYPES

Detailed Description

WiseLoop Web Content-Type Grabber Processor class definition
This class is designed to retrieve various web resources referred or contained by an url page and stores them in the $_validMedia array variable.
It uses the base class wlWmgProcessor capabilities to search an url page for certain types web resources by checking theirs content-type HTTP header responses.
WiseLoop Web Content-Type Grabber main features:

  • grab anything embedded or referred by the targeted url page depending on the content-type HTTP response headers;
  • HTTP headers Content-Type filtering: only those files having the specified content-type will be included in the grabbing results;
  • media url name (filename) filtering: only those files having or containing in their url names some specified strings 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 autocomplete depending on the contextual HTML content;
  • downloading capability: the WiseLoop PHP Content-Type 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;
Note:
WiseLoop takes no responsibility if the targeted url changes its tag structure or its HTML DOM tree, resulting in unexpected data retrieval; this will not be considered as malfunction or bug, and you should check the targeted url's HTML DOM tree for changes and modify the code that instatiates this class or any inherited classes.
Also, WiseLoop assumes no responsibility for any abusive use of this class and/or violation of terms of usage of the target url.
See also:
wlWmgProcessor
Author:
WiseLoop

Constructor & Destructor Documentation

__construct ( url,
contentType 
)

Constructor.
Creates a wlWmgContentTypeGrabber object.

Parameters:
string$urlthe target page url
string | array$contentTypecontent-type filter; if string, the content types should be separated by '|' (ex. 'image/jpeg|text-plain')
Returns:
void

Member Function Documentation

static getContentTypes ( ) [static]

Returns the available content types

Returns:
array

Field Documentation

HTTP content types: application/envoy, application/fractals, application/futuresplash, application/hta, application/internet-property-stream, application/mac-binhex40, application/msword, application/octet-stream, application/oda, application/olescript, application/pdf, application/pics-rules, application/pkcs10, application/pkix-crl, application/postscript, application/rtf, application/vnd.ms-excel, application/vnd.ms-outlook, application/vnd.ms-pkicertstore, application/vnd.ms-pkiseccat, application/vnd.ms-pkistl, application/vnd.ms-powerpoint, application/vnd.ms-project, application/winhlp, application/x-bcpio, application/x-cdf, application/x-compress, application/x-compressed, application/x-cpio, application/x-csh, application/x-director, application/x-dvi, application/x-gtar, application/x-gzip, application/x-hdf, application/x-internet-signup, application/x-iphone, application/x-javascript, application/x-latex, application/x-msaccess, application/x-mscardfile, application/x-msclip, application/x-msdownload, application/x-msmediaview, application/x-msmetafile, application/x-msmoney, application/x-mspublisher, application/x-msschedule, application/x-msterminal, application/x-mswrite, application/x-netcdf, application/x-perfmon, application/x-pkcs12, application/x-pkcs7-certificates, application/x-pkcs7-certreqresp, application/x-pkcs7-mime, application/x-pkcs7-signature, application/x-sh, application/x-shar, application/x-shockwave-flash, application/x-stuffit, application/x-sv4cpio, application/x-sv4crc, application/x-tar, application/x-tcl, application/x-tex, application/x-texinfo, application/x-troff, application/x-troff-man, application/x-troff-me, application/x-troff-ms, application/x-ustar, application/x-wais-source, application/x-x509-ca-cert, application/ynd.ms-pkipko, application/zip, audio/basic, audio/mid, audio/mpeg, audio/x-aiff, audio/x-mpegurl, audio/x-pn-realaudio, audio/x-wav, image/bmp, image/cis-cod, image/gif, image/ief, image/jpeg, image/pipeg, image/svg+xml, image/tiff, image/x-cmu-raster, image/x-cmx, image/x-icon, image/x-portable-anymap, image/x-portable-bitmap, image/x-portable-graymap, image/x-portable-pixmap, image/x-rgb, image/x-xbitmap, image/x-xpixmap, image/x-xwindowdump, message/rfc822, text/css, text/h323, text/html, text/iuls, text/plain, text/richtext, text/scriptlet, text/tab-separated-values, text/webviewhtml, text/x-component, text/x-setext, text/x-vcard, video/mpeg, video/quicktime, video/x-la-asf, video/x-ms-asf, video/x-msvideo, video/x-sgi-movie, x-world/x-vrml


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables