Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2006
    Thanked 0 Times in 0 Posts

    file_get_contents()/fopen() giving me grief

    Hey all,

    I'm having a rather annoying problem with my University project right now. Right now, I'm trying to use file_get_contents() to extract some data, which in turn would be turned into an XML feed. fopen() also gives me the same error:

    PHP Code:
    Warningfopen(http://www.myspace.com/profile) [function.fopen]: failed to open stream: Connection refused in -- on line 14 
    The script works on my personal server, but not my university webspace which is where it has to be.

    Research into this problem told me that "allow_url_fopen" has to be turned on and safe_mode has to be turned off in order for this to work, which they are.

    Can anyone shed any light on this?


  • #2
    Super Moderator
    Join Date
    May 2002
    Perth Australia
    Thanked 101 Times in 99 Posts
    from the uni can you file_get_contents() any external domain ? or is it just myspace that you are having issues with? , its possible that either the uni has blacklisted myspace or myspace has blacklisted the uni.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


    Posting Permissions

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