1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-30 21:30:14 +02:00

[Documentation] Move all wiki pages into the repo and make it pretty (#2494)

This commit is contained in:
Bocki
2022-03-22 21:33:29 +01:00
committed by GitHub
parent 16470e8119
commit 76f5de3d0f
53 changed files with 4215 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
## General recommendations
* Use [HTTPS](https://en.wikipedia.org/wiki/HTTPS) (`https://...`) over [HTTP](https://en.wikipedia.org/wiki/HTTPS) (`http://...`) whenever possible
## Test a site before building a bridge
Some sites make use of anti-bot mechanisms (e.g.: by using JavaScript) in which case they work fine in regular browsers, but not in the PHP environment. To check if a site works with RSS-Bridge, create a new bridge using the [template](../05_Bridge_API/02_BridgeAbstract.md#template) and load a valid URL (not the base URL!).
**Example (using github.com)**
```PHP
<?php
class TestBridge extends BridgeAbstract {
const NAME = 'Unnamed bridge';
const URI = '';
const DESCRIPTION = 'No description provided';
const MAINTAINER = 'No maintainer';
const PARAMETERS = array();
const CACHE_TIMEOUT = 3600;
public function collectData(){
$html = getSimpleHTMLDOM('https://github.com/rss-bridge/rss-bridge')
or returnServerError('No contents received!');
}
}
```
This bridge should return an empty page (HTML format)