2022-03-22 21:33:29 +01:00
## General recommendations
## Test a site before building a bridge
2024-08-30 04:21:51 +02:00
Some sites make use of anti-bot mechanisms (e.g.: by using JavaScript) in which case they work fine in regular browsers,
2025-05-17 20:18:36 +02:00
but not in the PHP environment. RSS-Bridge Docker container by default resorts to using libcurl-impersonate, which helps mitigating anti-bot mechanisms.
2024-08-30 04:21:51 +02:00
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!).
2022-03-22 21:33:29 +01:00
**Example (using github.com)**
```PHP
< ?php
2024-08-30 04:21:51 +02:00
class TestBridge extends BridgeAbstract
{
const NAME = 'Unnamed bridge';
const URI = '';
const DESCRIPTION = 'No description provided';
const MAINTAINER = 'No maintainer';
const PARAMETERS = [];
const CACHE_TIMEOUT = 3600;
2022-03-22 21:33:29 +01:00
2024-08-30 04:21:51 +02:00
public function collectData()
{
$html = getSimpleHTMLDOM('https://github.com/rss-bridge/rss-bridge');
}
2022-03-22 21:33:29 +01:00
}
```
2024-08-30 04:21:51 +02:00
This bridge should return an empty page (HTML format)