A web application for reporting, browsing, and checking scams. Users can submit scam reports, browse existing reports, and check phone numbers, emails, and websites to help prevent fraud and protect the community.
Live Website: scamreporthub.com
.
├── config.php.example # Configuration template (copy to config.php)
├── public_html/ # Main web application files
│ ├── admin_*.php # Admin panel files
│ ├── browse.php # Browse scams page
│ ├── index.php # Homepage
│ ├── report.php # Report a scam page
│ ├── scam.php # Individual scam detail page
│ ├── submit_*.php # Form submission handlers
│ ├── includes/ # Shared PHP includes
│ │ ├── db.php # Database connection
│ │ ├── navbar.php # Navigation bar
│ │ └── footer.php # Footer
│ ├── css/ # Stylesheets
│ ├── js/ # JavaScript files
│ ├── images/ # Static images
│ └── uploads/ # User-uploaded files (excluded from git)
├── database_backups/ # SQL backups (excluded from git)
└── public_html/community/ # WordPress installation (excluded from git)
- PHP 8.3 or higher
- MySQL/MariaDB database
- Web server (Apache/Nginx)
- Google reCAPTCHA v2 API keys
git clone <repository-url>
cd scam-report-hub- Create a MySQL database for the application
- Import your database schema (if you have a SQL dump)
-
Copy the configuration template:
cp config.php.example config.php
-
Edit
config.phpwith your actual values:- Database host, name, username, and password
- Google reCAPTCHA secret key
- Any other site-specific settings
-
Important: The
config.phpfile should be located outside the web root for security. On the production server, it's typically placed in a directory abovepublic_html. -
Update the absolute path in
public_html/includes/db.phpto point to yourconfig.phpfile location:require_once '/path/to/your/config.php';
Point your web server's document root to the public_html/ directory.
Apache Example (.htaccess is included):
- Document root:
/path/to/project/public_html
Nginx Example:
server {
root /path/to/project/public_html;
index index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}Ensure the uploads/ directory is writable by the web server:
chmod 755 public_html/uploads- Register your site at Google reCAPTCHA Admin
- Get your Site Key and Secret Key
- Add the Site Key to your frontend forms (check existing forms for implementation)
- Add the Secret Key to
config.php
The main configuration file contains:
- Database connection credentials
- Google reCAPTCHA secret key
- Optional site settings
Security Note: This file is excluded from version control. Always keep it outside the web root when possible.
The application uses PDO for database connections with the following security features:
- Prepared statements (emulation disabled)
- Exception-based error handling
- Production-safe error messages
- Report Scams: Users can submit scam reports with details, images, and evidence
- Browse Reports: Search and filter scam reports
- Admin Panel: Moderate and manage scam reports
- CSRF Protection: Security tokens on all forms
- File Uploads: Secure handling of user-uploaded evidence
- SEO Optimized: Sitemap generation and meta tags
Note: This repository does not include WordPress files. The WordPress installation in public_html/community/ is managed separately and is excluded from version control.
If you need to set up WordPress:
- Install WordPress separately in the
public_html/community/directory - Configure
wp-config.phpwith your WordPress database credentials - The WordPress installation is independent of the main Scam Report Hub application
The following are excluded from version control (see .gitignore):
config.php- Contains sensitive credentialsdatabase_backups/- SQL backup filespublic_html/uploads/- User-uploaded contentpublic_html/community/- WordPress installationmanifest.json- Server configuration backup.bash_profile- Server-specific shell config- Log files, cache files, and temporary files
- All main application files are in
public_html/ - Shared includes (database, navigation, footer) are in
public_html/includes/ - Static assets (CSS, JS, images) are organized in their respective directories
- Admin functionality is prefixed with
admin_in filenames
- Configuration files with credentials are excluded from git
- Database connections use PDO with prepared statements
- CSRF tokens protect all forms
- File uploads should be validated and sanitized
- Error messages don't expose sensitive information in production
[Add your license information here]
[Add contribution guidelines if applicable]
For issues and questions, please create an issue or contact [your contact information].