# RSS-Bridge ![RSS-Bridge](static/logo_600px.png) RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one. [![LICENSE](https://img.shields.io/badge/license-UNLICENSE-blue.svg)](UNLICENSE) [![GitHub release](https://img.shields.io/github/release/rss-bridge/rss-bridge.svg?logo=github)](https://github.com/rss-bridge/rss-bridge/releases/latest) [![irc.libera.chat](https://img.shields.io/badge/irc.libera.chat-%23rssbridge-blue.svg)](https://web.libera.chat/#rssbridge) [![Chat on Matrix](https://matrix.to/images-nohash/matrix-badge.svg)](https://matrix.to/#/#rssbridge:libera.chat) [![Actions Status](https://img.shields.io/github/workflow/status/RSS-Bridge/rss-bridge/Tests/master?label=GitHub%20Actions&logo=github)](https://github.com/RSS-Bridge/rss-bridge/actions) Screenshot of the Twitter bridge configuration: ![Screenshot #1](/static/twitter-form.png?raw=true) Screenshot of the Twitter bridge for Rasmus Lerdorf: ![Screenshot #2](/static/twitter-rasmus.png?raw=true) [Documentation](https://rss-bridge.github.io/rss-bridge/index.html) Check out RSS-Bridge right now on https://rss-bridge.org/bridge01 or find another [public instance](https://rss-bridge.github.io/rss-bridge/General/Public_Hosts.html). ## Tutorial RSS-Bridge requires php 7.4. ### Install with git: ```bash cd /var/www git clone https://github.com/RSS-Bridge/rss-bridge.git # Give the http user write permission to the cache folder chown www-data:www-data /var/www/rss-bridge/cache # Optionally copy over the default config file cp config.default.ini.php config.ini.php # Optionally copy over the default whitelist file cp whitelist.default.txt whitelist.txt ``` Example config for nginx: ```nginx # /etc/nginx/sites-enabled/rssbridge server { listen 80; server_name example.com; root /var/www/rss-bridge; index index.php; location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php-fpm.sock; } } ``` ### Install with Docker: Install by using docker image from Docker Hub: ```bash # Create container docker create --name=rss-bridge --publish 3000:80 rssbridge/rss-bridge # Start container docker start rss-bridge ``` Browse http://localhost:3000/ Install by locally building the image: ```bash # Build image from Dockerfile docker build -t rss-bridge . # Create container docker create --name rss-bridge --publish 3000:80 rss-bridge # Start the container docker start rss-bridge ``` Browse http://localhost:3000/ ### Alternative installation methods [![Deploy on Scalingo](https://cdn.scalingo.com/deploy/button.svg)](https://my.scalingo.com/deploy?source=https://github.com/sebsauvage/rss-bridge) [![Deploy to Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) [![Deploy to Cloudron](https://cloudron.io/img/button.svg)](https://www.cloudron.io/store/com.rssbridgeapp.cloudronapp.html) The Heroku quick deploy currently does not work. It might possibly work if you fork this repo and modify the `repository` in `scalingo.json`. See https://github.com/RSS-Bridge/rss-bridge/issues/2688 Learn more in [Installation](https://rss-bridge.github.io/rss-bridge/For_Hosts/Installation.html). ### Create a new bridge from scratch Create the new bridge in e.g. `bridges/BearBlogBridge.php`: ```php find('.blog-posts li'); foreach ($blogPosts as $blogPost) { // Select the anchor at index 0 (the first anchor found) $a = $blogPost->find('a', 0); // Select the inner text of the anchor $title = $a->innertext; // Select the href attribute of the anchor $url = $a->href; // Select the