Results 1 to 3 of 3
  1. #1

    PHP, Howto open a file on external server?

    I have this script wich works fine on other servers. But recently I changed webhoster, and it's not working there. I also found out that they run php safe mode on their servers. So maybe that is the problem. Here is the script:


    //if($contents = join ('', file ('URL TO SITE'))){

    if($contents = join ('', file ('URL TO SITE')))





    print "<font size=1 face=\"verdana\" color=\"#A2A2A2\">$substring</font>\n";


    print "<font size=1 face=\"verdana\" color=\"#A2A2A2\">No weather information available.</font>\n";



    I asked them what might be wrong. They said I cannot open a file on a external server. So has this something to do with safe mode? Is there any way around this problem. Maybe I can change some lines in it?

    Hope some of you out there can help



  2. #2
    Join Date
    Apr 2003
    London, UK
    Some more info would be useful, what's the exact error you're getting, and the url you're trying to open?

  3. #3

    Warning: file(" nd&SubTitle=Denmark&SubTitle=Iceland&T=METAR%A0Nordic%A0countries&Frequency=30") - No such file or directory in...

    Warning: Bad arguments to join() in....


    if($contents = join ('', file (' nd&SubTitle=Denmark&SubTitle=Iceland&T=METAR%A0Nordic%A0countries&Frequency=30')))

    I can't post full url adresses before I've posted 5 posts in this add htt....&ww... in front of those url's

Posting Permissions

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