0

At work, I was given a file with which to connect to the proxy which I can do from there but I have no idea how to do it from home. I tried going "under the hood" and setting up a proxy with a random www address but that didn't work, probably since I have no idea of what a proxy is. Also, I wasn't able to find any good tutorials on this online that explain in language a beginner could understand.

I'm on windows by the way, and here's the code from that file

<?php
function get_file($uri) {
 // get file via proxy
 
    $context = stream_context_create(
    array('http'=>
        array('proxy'=>'www.someurl.com',
              'header'=>'Cache-Control: no-cache'
             )
     ));  
    $contents = file_get_contents($uri,false,$context);
    return $contents;
};
?>
3
Contributors
3
Replies
7
Views
6 Years
Discussion Span
Last Post by asif49
0

does that server have internet access and a webserver setup on it
im a bit confused by your request bottom line are you trying to access a file from home ?

0

I have a server set up on it yeah, from which I connect to the mysql database, test out php files on it and so on.

That wikipedia link explanation of proxy servers was good but I don't know what a beginner can get from the second link. I've looked at one or two other tutorials and there's just code there without explanation or while setting up there's some url which needs to be typed, but where is that gotten from/why is it being used isn't mentioned...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.