![]() |
WiseLoop PHP Web Media Grabber 3.1.1
Advanced PHP web resources extractor
|
Public Member Functions | |
__construct ($url) | |
setUrl ($url) | |
getUrl () | |
setProxy ($proxy) | |
getProxy () | |
setCookie ($cookie) | |
getCookie () | |
setLogFilePath ($logFilePath) | |
getLogFilePath () | |
addLogEntry ($message, $asTitle=false) | |
getExists () | |
getContents () | |
getHeaders () | |
setHeaders ($data) | |
getBrowserCookie () | |
getLength () | |
getContentType () | |
getResponse () | |
parseUrl () | |
getUrlScheme () | |
getUrlDomain () | |
getUrlHost () | |
getUrlHostName () | |
getUrlDomainAndPath () | |
getUrlPath () | |
Static Public Member Functions | |
static | isCurlEnabled () |
static | isFopenEnabled () |
static | getUnableMessage () |
static | normalizeUrl ($url) |
Private Member Functions | |
curlInit ($forHeadersOnly=false) | |
Private Attributes | |
$_url | |
$_proxy | |
$_headers | |
$_contents | |
$_cookie | |
$_logFilePath |
WiseLoop Web Grabber cURL class definition
This class provides a set of handling methods for a certain url.
__construct | ( | $ | url | ) |
addLogEntry | ( | $ | message, |
$ | asTitle = false |
||
) |
Adds and entry to the verbose log.
string | $message | |
bool | $asTitle |
curlInit | ( | $ | forHeadersOnly = false | ) | [private] |
Prepares a cURL handle for the current url; the returning cURL handle will behave like a real browser.
bool | $forHeadersOnly | specifies if the returning cURL handler is intended to be used only for getting the current url headers |
getBrowserCookie | ( | ) |
Computes and returns a compatible browser cookie string from the current headers.
getContents | ( | ) |
Reads and return the entire content of the current url.
getContentType | ( | ) |
Returns the content type of the current url.
getCookie | ( | ) |
Returns the cookie string of the current Curl object.
getExists | ( | ) |
Checks if the current url exists.
getHeaders | ( | ) |
Returns the headers of the current url.
getLength | ( | ) |
Returns the content length of the current url.
getLogFilePath | ( | ) |
Returns the verbose log file path.
getProxy | ( | ) |
Returns the proxy address of the current Curl object.
getResponse | ( | ) |
Returns the response header line of the current url.
static getUnableMessage | ( | ) | [static] |
Returns a message that explains why the local machine is unable to handle cURL functions, or an empty string if it is able to.
getUrl | ( | ) |
Returns the url string of the Curl object.
getUrlDomain | ( | ) |
Returns the internet domain name of the current url in the following form: scheme://subdomain.domainname.extension (ie. http://www.wiseloop.com).
getUrlDomainAndPath | ( | ) |
Returns the domain name and the path location where the current url resource is located. (ie. for the url http://www.wiseloop.com/images/animage.jpg, the method will return http://www.wiseloop/images).
getUrlHost | ( | ) |
Returns the host name of the current url in the following form scheme://domainname.extension (ie. http://wiseloop.com).
getUrlHostName | ( | ) |
Returns the host name of the current url in the following form domainname.extension (ie. wiseloop.com).
getUrlPath | ( | ) |
Returns the path location where the current url is located.
getUrlScheme | ( | ) |
Returns the internet scheme of the current url in the following form: scheme://, or false if no scheme is present (ie. http://).
static isCurlEnabled | ( | ) | [static] |
Tests if "php_curl" extension is enabled.
static isFopenEnabled | ( | ) | [static] |
Tests if "allow_url_fopen" setting from php.ini is on.
static normalizeUrl | ( | $ | url | ) | [static] |
Normalizes the given url.
string | $url |
parseUrl | ( | ) |
Parses the current url string and returns the url parts (scheme, port, username, password, sub-domain, domain, extension, host, path, query, fragment)
setCookie | ( | $ | cookie | ) |
Sets the cookie string to be sent when making the request.
string | $cookie |
setHeaders | ( | $ | data | ) |
Sets the headers of the current url.
array | $data |
setLogFilePath | ( | $ | logFilePath | ) |
Sets the verbose log file path.
string | $logFilePath |
setProxy | ( | $ | proxy | ) |
Sets the proxy address for the Curl object. If empty or null, no proxy will be used. Proxy address is considered only if php_curl module is active for the current PHP configuration.
string | $proxy |
setUrl | ( | $ | url | ) |
Sets the url for the Curl object.
string | $url |
$_contents [private] |
Type: string the cached contents
$_cookie [private] |
Type: string the cookie to be sent on request
$_headers [private] |
Type: array the cached headers
$_logFilePath [private] |
Type: string the verbose log file
$_proxy [private] |
Type: string the proxy address that will be used to make the request
$_url [private] |
Type: string the current url