kolibrios-gitea/contrib/network/webview_proxy/proxy.php
vitalkrilov 603c738c43 webview_proxy: added PHP-script which can be installed on your Web-server and be a proxy for WebView browser
git-svn-id: svn://kolibrios.org@9886 a494cfbc-eb01-0410-851d-a64ba20cac60
2022-12-17 22:24:05 +00:00

14 lines
532 B
PHP

<?php
$your_local_page_address = '/proxy.php'; // if in /index.php: '/' or '/index.php' (depends on request url)
$your_useragent = 'Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0';
$site = substr($_SERVER['REQUEST_URI'], strlen($your_local_page_address . '?site='));
$site = str_replace("\\", "\\\\", $site);
$site = str_replace("`", "\\`", $site);
$site = str_replace("$", "\\$", $site);
$site = str_replace("\"", "\\\"", $site);
echo passthru('curl -L -A "' . $your_useragent . '" "' . $site . '"');
?>