mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 15:47:32 +02:00
Updated BridgeAbstract (markdown)
@@ -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.
|
||||
|
Reference in New Issue
Block a user