Jim from Princeton Jim from Princeton - 2 months ago 7x
PHP Question

PHP proxy not passing URL arguments

I am trying to proxy this request to my server:

using a simple PHP proxy that I found:

$url = $_REQUEST['url'];
if (preg_match('/\b(https?|ftp):\/\/*/', $url) !== 1) die;
echo (file_get_contents($url));

but the variable arguments are not passed...

how do I modify the PHP script in order to get the arguments from the url, which I pass to the proxy like this:


You simply need to ensure that the URL is encoded before it's used as a parameter in another URL. You should be fetching this URL instead: