Jim from Princeton Jim from Princeton - 1 year ago 176
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:

Answer Source

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:
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download