Can anyone help?
I have tried many methods to open remote files, and they all seem to fail with the same type of error.
*They only fail on this host*, but oddly, they work on another host I use, which leads me to believe its something to do with the host's setup.
The support people for the host dont think it is their problem tho, so Im looking for guidance as to what it could be, so I can get back to them with details, or find a workaround that works.
I have a script that shows the phpinfo() at www.lsblogs.com/x3.php if that helps anyone by being able to see the php setup.
Examples of what fails (but do work on another host) are
<?php $res = file_get_contents('http://www.google.com/robots.txt');
which fails with
also fopen fails in a similar waywarning: file_get_contents(http://www.google.com/robots.txt): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized in /home/content/l/s/b/lsblogs/html/x4.php on line 3
example fopen code extract, works on one domain, not on the other...
$testurl = "http://www.google.com/robots.txt"; $fp = fopen( $testurl, "r" ) or die( "
See error above, fopen failed for " . $testurl );
Same for get_meta_tags, and it does not matter what url I use, I have tried many (all local urls work fine, its just remote ones!)Warning: fopen(http://www.google.com/robots.txt): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized in /home/conten etc etc
Does anyone know what the problem is?
Does anyone know a way to open a remote file that would work on this host? Or what to tell the host to check/alter so it will work?
thanks in advance![/quote]