"[function.file-get-contents.html]: failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized"
If you are trying to go straight out through the firewall then that could be the message displayed by it when traffic is trying to go somewhere outside it's whitelist when not coming from the proxy ip. If that is the proxy then it is requesting authentication. Messages are kept generic to keep it hard to reverse engineer.
Trying to work in locked down environment is a pain. Completely at the whim of the Network Admin team, who most like get an enjoyment out of stopping people do stuff. I know one client who throws away any form posts above a certain size which stops people uploading to youtube and stuff. All what gets to the server is nothing, I had to step the client incrementally up the filesizes when I could upload 20MB easily. Not nice when you are writing stuff that relies on large filesize uploading.
The javascript file is just a set of condionals to say when to go direct( the whitelist ) and when to go through the proxy. Java does pac file parsing but I cannot find one for PHP.
// Case 2: Browser IP: Monash South Africa network
// Remote Destination: nested if see below
if (isInNet(myIpAddress(), "168.210.50.0", "255.255.255.0" ) ||
isInNet(myIpAddress(), "130.194.11.95", "255.255.255.255") ||
isInNet(myIpAddress(), "172.24.64.0", "255.255.224.0" )) {
// Remote Destination: Local Monash South Africa network
if ( dnsDomainIs(host, ".monash.ac.za") ||
dnsDomainIs(host, ".zaf.monash.edu") ||
isInNet(host, "168.210.50.0", "255.255.255.0" ) ||
isInNet(host, "130.194.11.95", "255.255.255.255") ||
isInNet(host, "172.24.64.0", "255.255.224.0" )) {
return "DIRECT";
}
// Remote Destination: Not Monash South Africa network
return "PROXY proxy.zaf.monash.edu:8080";//proxy address.
}
It's just so they don't have to go around updating eveyone if it changes.
If you are doing work related stuff you can ask for the address to be added to the whitelist. Someone might be nice and it makes it very easy, depends on the company. I have an image of the worst admin who kept everything locked down,completely argumentative but put the company database on a share as they didn't know how they worked. Big very important database to the company and it was copied a few times. Most others were technically better but when a job involves mostly disabling people from doing things being a pain in the rear, even ideologically, is a plus.
I'd like to be able to give you an easy way to do it but hacking the ip of the proxy and creating a $context for file_get_contents generated with stream_context_get_default is the simplest. Basic authentication will make it harder, digest pain in the rear.
Really you have to hack your way outside by reverse engineering it. Every network is different, and a lot of things that will make your life hard are just checkboxes to an admin( windows one anyway ).
I warn you some admins might try and get you sacked/complain to your manager for doing it. All to do with the company and any idiocy it may contain.
If you do get through follow up as this stuff as it is pretty useful to know and may turn up in google searches for other people to try.
Sorry I can't be much more help, but I am on the outside and this is an inside job.