TeraFetch is a premium, web-based tool designed to fetch, preview, and download videos shared via Terabox (terabox.com, 1024tera.com, etc.) without speed limitations. Built using a custom, zero-dependency PHP MVC architecture, it incorporates a range-compatible streaming proxy and a Python-based scraper integration to deliver a seamless, ads-free streaming experience.
- ⚡ High-Speed Direct Downloads: Bypass anonymous speed limits by fetching and resolving direct CDN download links.
- 🎬 Premium Video Player: Fully integrated with Plyr.js for progressive buffer controls, custom speed selectors, and premium dark/light mode accents.
- 🔄 Range-Compatible Streaming Proxy: Play and scrub through large video files instantly using custom HTTP Range and partial content (
206) headers. - 🖱️ Click-to-Fetch Live Feed: Banners under the "Recent Downloads Feed" are clickable, scrolling and auto-filling the downloader form to fetch and play with a single click.
- 📊 Admin Dashboard & Analytics:
- Track total pageviews, unique visitors, and download stats.
- View geolocation-simulated traffic distributions (browsers, devices, platforms).
- Searchable, paginated Download Logs with a one-click secure Delete All log entry feature.
- Manage global site configurations and visitor contact messages.
- 🔒 OWASP Security Audited:
- SQL Injection: Complete protection via PDO prepared statements.
- Cross-Site Scripting (XSS): Sanitized outputs using strict HTML entity encoders.
- CSRF Defense: Session-bound cryptographic tokens protecting forms.
- Rate Limiting: Database-backed throttling protecting endpoints from abuse.
- Backend: PHP 8.0+ (Custom MVC framework, zero external packages)
- Database: MySQL / MariaDB (Prepared tables, relations, and index optimization)
- Scraper Engine: Python 3.8+ (
requestsandurllibfallback clients) - Frontend: Vanilla JS, Bootstrap 5, Bootstrap Icons, Plyr.js CSS/JS
- XAMPP (or any Apache + PHP + MySQL stack)
- PHP 8.0+
- Python 3.8+ with
requestslibrary:pip install requests
Move the TeraFetch project folder into your server's root directory (e.g., C:/xampp/htdocs/TeraFetch or F:/xampp/htdocs/TeraFetch).
- Open phpMyAdmin (
http://localhost/phpmyadmin). - Create a new database named
terafetch. - Import the SQL schema file:
- Path:
database/schema.sql
- Path:
If your server runs on a custom port or path, verify the dynamic settings in config/config.php:
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', ''); // Your database password
define('DB_NAME', 'terafetch');Access the Admin dashboard to view logs, monitor traffic, and configure active Terabox session keys.
- URL:
http://localhost/TeraFetch/admin - Default Username:
admin - Default Password:
admin123
Terabox limits anonymous scraping. To enable real video fetching:
- Log into your account on Terabox.
- Open your browser Developer Tools (
F12) -> Go to Application -> Cookies. - Copy the value of the
nduscookie. - Paste this value into Admin Panel > Website Settings > Terabox Session Cookie (ndus) and save.
TeraFetch/
├── app/
│ ├── Controllers/ # Route entry controllers (Home, Fetch, Admin)
│ ├── Core/ # Custom MVC engine (Router, Controller, Database, Model)
│ ├── Helpers/ # Utilities (Session, Utils, Validator, RateLimiter)
│ ├── Models/ # Database tables (Admin, FetchHistory, Visitor, Setting)
│ ├── Scripts/ # Scraper engine (terabox_fetcher.py)
│ ├── Services/ # PHP Scraper Bridge executor (TeraboxService.php)
│ └── Views/ # Layouts, Page templates, Admin interfaces, Errors
├── config/
│ └── config.php # Global environment settings & session configurations
├── database/
│ └── schema.sql # Database tables structures
├── public/
│ ├── css/ # Brand styling & dark mode sheets
│ ├── js/ # Dynamic AJAX, charts rendering, & client controllers
│ ├── stream.php # HTTP Range chunk-streaming player proxy
│ ├── index.php # Front Controller bootstrapper
│ └── .htaccess # URL rewriting routing rules
└── .gitignore # Clean git directories rules
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License. See the LICENSE file for details.