-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
69 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
## 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!). | ||
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 = []; | ||
const CACHE_TIMEOUT = 3600; | ||
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; | ||
|
||
public function collectData(){ | ||
$html = getSimpleHTMLDOM('https://github.com/rss-bridge/rss-bridge') | ||
or returnServerError('No contents received!'); | ||
} | ||
public function collectData() | ||
{ | ||
$html = getSimpleHTMLDOM('https://github.com/rss-bridge/rss-bridge'); | ||
} | ||
} | ||
``` | ||
|
||
This bridge should return an empty page (HTML format) | ||
This bridge should return an empty page (HTML format) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters