file()/fopen() does not work with URLs on same domain

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adam

    file()/fopen() does not work with URLs on same domain

    Anyone ever seen file() and fopen() fail (permission denied) with URLs
    that are on the same domain as the PHP script, but work fine with
    external URLs? Any ideas what might cause that?

    file('http://google.com'); // works fine
    file('http://mydomain.com/whatever'); // invariably fails with
    permission denied. Accessing the same URL normally works, just not from PHP

    TIA
Working...