SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict blizzman24's Avatar
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    file_get_contents help

    I'm trying to read a html page with an "_". like...

    mysite.com/sub/page_here

    I get this error when trying to read it...
    Code:
    Warning: file_get_contents(http://mysite.com/sub/page_here) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in ****.php on line 11
    the script works with a url without the "_" though.

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that url is returning a 403 forbiden header. access denied.

    is that a url on your own webserver?

  3. #3
    SitePoint Addict blizzman24's Avatar
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no, but like I said before... it works for urls without "_"(on the same site).

  4. #4
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that webserver is returning a 403 header. why? i dont know. maybe they are sniffing the request and denying you. maybe they only do it on certain urls.

    try another website and it will work fine.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •