weired problem with fopen

Discussion in 'PHP' started by ankit_frenz, Mar 21, 2009.

  1. #1
    i have never faced this kind of problem before and i have no clue why this is happeneing...
    
    $site=fopen("url","r");
    
    Code (markup):
    this ke pt on returning 500 internal server error for a particular site...al other sites are working fine..
    tried curl as well got the same error...but that site is accessible thorugh browser..i donot get where i am going wrong..
    can someone help me on this
    thx
     
    ankit_frenz, Mar 21, 2009 IP
  2. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What is the URL?
     
    SmallPotatoes, Mar 21, 2009 IP
  3. ActiveFrost

    ActiveFrost Notable Member

    Messages:
    2,072
    Likes Received:
    63
    Best Answers:
    3
    Trophy Points:
    245
    #3
    What you are trying to open ( html, php, asp, js ... ) ? Maybe their default ( like on many servers index.html ) file is set to something 'unreadable' ( unreadable from remote access ) ?
     
    ActiveFrost, Mar 21, 2009 IP
  4. websea

    websea Peon

    Messages:
    572
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You must change rights 777 on server to the file.
     
    websea, Mar 21, 2009 IP
  5. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #5
    It might have your server IP banned. Try using localhost.

    Always use CURL instead and try to set referring URL to the site itself if the URL is not the main one.

    Peace,
     
    Barti1987, Mar 21, 2009 IP
  6. ankit_frenz

    ankit_frenz Active Member

    Messages:
    1,111
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    63
    #6
    i am trying to acess it through my localhost itself...no servers!!
    the file is the search result page of a search engine...
    so i am doing something like
    www.xxx.com/search?keyword=xczxczxc
     
    ankit_frenz, Mar 21, 2009 IP