Download the PHP package chrisullyott/php-url-extractor without Composer
On this page you can find all versions of the php package chrisullyott/php-url-extractor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chrisullyott/php-url-extractor
More information about chrisullyott/php-url-extractor
Files in chrisullyott/php-url-extractor
Package php-url-extractor
Short Description Extract URLs from HTML content.
License MIT
Homepage https://github.com/chrisullyott/php-url-extractor
Informations about the package php-url-extractor
php-url-extractor
Extract URLs from HTML content, applying optional filters.
Installation
With Composer:
Usage
Options
setAttributeFilter (array)
The #getUrls method creates a DOMDocument and checks given element attributes, such as src and href, for URLs you might be interested in. Use #setAttributeFilter to override the default set of attributes with your own.
setHomeUrl (string)
Providing a home URL filters results to those local to the domain. Any relative URL beginning with one slash / and not two slashes is considered local as well. Setting this also builds the url property (an absolute URL) for the objects returned by the #getUrls method.
setAlternateDomains (array)
Used with #setHomeUrl. If set, the returned URLs will include those whose domain is found in the array. In this array, you may enter strings, like media.site.com and/or regular expressions, like /.*\.site\.com/.
setFilesOnly (boolean)
Whether we should only return URLs with file extensions.
setIgnoredExtensions (array)
Used with #setFilesOnly. Excludes URLs whose file extension is found in the array.