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

Public Member Functions

 __construct ($url, $fileExtensions=null, $checkContentType=true)

Static Public Member Functions

static getFlashFileExtensions ()

Data Fields

const FLASH_FILE_EXT = '.swf|.swt|.swc'

Protected Member Functions

 mainFilter ()

Private Attributes

 $_fileExtensions
 $_checkContentType

Detailed Description

WiseLoop Flash Grabber Processor class definition
This class is designed to retrieve Flash / Flex files referred 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 flash (flex) links by checking its object tags.
WiseLoop Flash Grabber main features:

  • grab Flash or Flex applications embedded into the targeted url page;
  • flash (flex) files search and identification by the HTML content-type response header: the grabbing engine is able to identify beyond the obvious Flash resources having the .swf file extension - it will find the Flash 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 Flash / Flex file resource;
  • flash file extension filtering: only those flash files having the specified extensions will be included in the grabbing results;
  • media url name (filename) filtering: only those Flash files having or containing in their url names some specified strings will be included in the grabbing results;
  • media size filtering: only those Flash files having the specified size (in bytes) will be included in the grabbing results;
  • media count limiter: number of grabbed Flash files will be limited to a specified value;
  • HTML area searching: the grabbing engine is able to search for Flash files only inside a designated HTML area specified by a tag; in this way you can skip grabbing from the start any unwanted Flash 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 Video Grabber is able to download the grabbed Flash 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 instantiates 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,
fileExtensions = null,
checkContentType = true 
)

Constructor.
Creates a wlWmgFlashGrabber object.

Parameters:
string$urlthe target page url
string | array$fileExtensionsflash extensions filter; if string, the types should be separated by '|' (ex. '.swf|.swt|.swc')
bool$checkContentTypeif true, the grabber engine will check also the content-type of the grabbed media to make sure it is a flash
Returns:
wlWmgFlashGrabber

Member Function Documentation

static getFlashFileExtensions ( ) [static]

Returns the available flash files extensions

Returns:
array
mainFilter ( ) [protected]

Filters the media array by leaving only the valid flash (flex) media resources

Returns:
void

Reimplemented from wlWmgProcessor.


Field Documentation

$_checkContentType [private]

Type: bool - if true, the grabber engine will check also the content-type of the grabbed media to make sure it is a flash app;
this checking will add some additional processing as headers for each possible media will be downloaded in order to perform the flash validation.
If false, the grabber engine will use only on the provided (or common) extensions for video files and therefore the grabbing process will be faster but can bring non-flash files also.

$_fileExtensions [private]

Type: array|string - flash extensions filter; if string, the types should be separated by '|' (ex. '.swf|.swt|.swc')

const FLASH_FILE_EXT = '.swf|.swt|.swc'

Flash file extensions


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