diff --git a/BridgeAbstract.md b/BridgeAbstract.md index df5afec..54c9d20 100644 --- a/BridgeAbstract.md +++ b/BridgeAbstract.md @@ -199,6 +199,7 @@ It is considered good practice to use them rather than implementing equivalent f * [`returnError`](#the-returnerror-function) * [`returnClientError`](#the-returnclienterror-function) * [`returnServerError`](#the-returnservererror-function) +* [`getContents`](#the-getcontents-function) * [`getSimpleHTMLDOM`](#the-getSimpleHTMLDOM-function) * [`getSimpleHTMLDOMCached`](#the-getsimplehtmldomcached-function) @@ -234,6 +235,14 @@ returnServerError('Your error message') Use this function when a problem occurs that has nothing to do with the parameters provided by the user. (like: Host service gone missing, empty data received, etc...) +## The `getContents` function + +This function is a wrapper arround the [file_get_contents](https://secure.php.net/manual/en/function.file-get-contents.php) original PHP function. It downloads the content of a given URI while respecting the various settings defined at a global level by RSS-Bridge (i.e., proxy host, user agent, etc.). It does accept all the parameters of the original [file_get_contents](https://secure.php.net/manual/en/function.file-get-contents.php) function. + +```PHP +$html = getContents('your URI'); +``` + ## The `getSimpleHTMLDOM` function This function is a wrapper around the [simple_html_dom](http://simplehtmldom.sourceforge.net/) [file_get_html](http://simplehtmldom.sourceforge.net/manual_api.htm#api) function in order to provide context by design.