PHP Cache Proxy
Proxy for forced caching of site files with the ability to open without an Internet connection (OperaMini_4.21_mod from J2ME but server-side)
Works on PHP 7.4.
Installation
- Download the source code as located within this repository, and upload it to your web server.
- Use
db.sqlto create thecachedpagestable in a database of choice. - Enter database credentials to "dbcfg.php" file
How to use
- Just open in browser page: http://[yourhost.com]/[targetsite]::[targetpath]
- For example: http://192.168.1.1:8080/google.com::search?q=news
Project structure
index.php— entry point: resolves the target, fetches it, rewrites HTML and sends the response. Settings are in the$configarray at the top.ProxyTarget.php— parses/<site>::<path>(falls back to the Referer / last visited site) and builds the upstream URL.PHPProxy.php— cURL fetching, cache-first lookups and response output.PageCache.php— thecachedpagesindex plus thedata/<site>/<id>files.UrlRewriter.php— rewrites links, sources, form actions, redirects and inline-script URLs to go through the proxy.htmlparser.php— simplehtmldom (third-party, unchanged).