No Description

poesty 7e24f52d6c Add README.md for PHP port of Rural Dictionary 2 months ago
static ddc274449b Add initial project files including .htaccess, index.php, CSS, images, and license 2 months ago
.htaccess ddc274449b Add initial project files including .htaccess, index.php, CSS, images, and license 2 months ago
LICENSE ddc274449b Add initial project files including .htaccess, index.php, CSS, images, and license 2 months ago
README.md 7e24f52d6c Add README.md for PHP port of Rural Dictionary 2 months ago
index.php 4cd7eb60f6 Refactor index.php for improved DOM handling and API integration 2 months ago

README.md

📖 Rural Dictionary (PHP Port)

We're rural, not urban.

This is a PHP port of the original Python-based Rural Dictionary - a privacy-respecting, NoJS-supporting Urban Dictionary frontend.

🔄 Port Information

This PHP version maintains feature parity with the original Python implementation while offering:

  • Simpler deployment (just PHP + web server required)
  • Lower memory footprint
  • Native integration with common web servers
  • No Python dependencies needed

✨ Features

Just like the original, this frontend supports all Urban Dictionary features including:

  • Word definitions
  • Author pages
  • Homepage with words of the day
  • Random word definitions
  • 404 page with words similar to search
  • Pagination

🚀 Deployment

Clone repository:

git clone https://git.qunn.eu/poesty/rural-dict.git
cd rural-dict
git checkout php-port

📦 Requirements

  • PHP 8.0 or higher
  • PHP extensions:
    • curl
    • dom
    • mbstring
  • Web server (Apache/Nginx)

🌐 Web Server Configuration

Apache

Make sure mod_rewrite is enabled and use the included .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]

Nginx

Add this to your server configuration:

location / {
    try_files $uri $uri/ /index.php?$args;
}

📁 Directory Structure

.
├── index.php          # Main application file
├── .htaccess         # Apache configuration
└── static/           # Static assets
    ├── css/
    │   └── main.css
    └── img/
        ├── favicon.png
        └── logo.png

🔗 Redirection

To use Rural Dictionary, simply replace an Urban Dictionary URL with a Rural Dictionary URL. You can use browser extensions like Redirector for automatic redirection.

For example, change: https://urbandictionary.com/define.php?term=kin to: https://your-instance.com/define.php?term=kin

👥 Credits

  • Original Rural Dictionary by cobra
  • thirtysix - Modern rewrite and feature implementation
  • zortazert - Initial frontend development
  • PHP port by poesty

📜 License

This project is licensed under the AGPLv3+ license - see the LICENSE file for details.

🤝 Support

For support and discussions about the original Rural Dictionary, join their Matrix room.

For issues specific to this PHP port, please use the issue tracker.