That's what i found about file(): Tip: You can use a URL as filename with this function if the "fopen wrappers" have been enabled. See fopen() for more details.
So check your php.ini settings. If you're hosted by a hosting company and they failed to enable the fopen wrappers, you can overwrite their php.ini with your own. Simply place a file called php.ini in the document_root of your domain and this php.ini will get loaded instead of the php.ini of your hosting company. Nice and undocumented feature, which i found here in this list a few weeks ago. Regards Michael "Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > i do not know if file() can be used with files on remote servers. > fopen() can, if this feature is enabled in php.ini. > > Regards Michael > > "Roman Duriancik" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I have this code : > > $text = file("http://www.hokej.sk/spravy/?id=16159"); > > echo count($text); > > for ($i=0;$i<count($text);$i++): > > echo $text[$i]; > > endfor; > > > > when in file commnad i insert page from local net or our web server this > > script run correctly but if i insert page from internet i have this error > > event > > > > Warning: php_hostconnect: connect failed in > > d:\programovanie\php\ftp\skuska.php on line 2 > > > > Warning: file("http://www.hokej.sk/spravy/?id=16159") - Bad file > descriptor > > in d:\skuska.php on line 2 > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php