Q:

how to overwrite $_SERVER['REMOTE_ADDR'] value to load a IP restricted page

I have an document URL, that we are getting from an our data resource that is opening at our network, because data resource made our IP whitelist at there end. 
But issue is, we are allowing our users to load an see that document on our website/app. But as its IP restricted show document URl not opening at website/app users end. 
Is there any way that we will overwrite $_SERVER['REMOTE_ADDR'] or call document URL with our IP in an iframe and show to end users ? I am using PHP/JS/.htaccess
Regards

A:

I got the solution via using below code - 
Get the URL content using PHP function on the site's server and load the content  - 
$data = file_get_contents($url);
header("Content-type:application/pdf");
echo $data; 

