View Full Version : file_get_contents()/fopen() giving me grief

02-22-2007, 11:28 PM
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:

Warning: fopen(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?


02-23-2007, 12:38 AM
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.