if I use: readfile("ftp://username:[EMAIL PROTECTED]/test.txt");
It doesn't have any errors and comes up blank. If I put: $result = readfile("ftp://username:[EMAIL PROTECTED]/test.txt"); print ($result); it ends up showing a '0' by iteself. that's it. and I knwo the txt file is full of info. I'm stumped again. Cheers. for your help. Thomas "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > --- Thomas <[EMAIL PROTECTED]> wrote: > > I'm having problems creating code to read a file from another > > server. > > > > 1. Is this even possible? with a secure server aswell? > > Yes. > > > this is my code: > > <?php > > $filename = "http://www.domain.com/test.txt"; > > $handle = fopen ($filename, "r"); > > $content = fread($handle, filesize ($filename)); > > fclose($handle); > > echo $content; > > ?> > > This code can be replaced with: > > readfile('http://www.domain.com/test.txt'); > > As far as debugging problems related to this, check your php.ini and make sure > the URL wrapper is enabled. Otherwise, you will be restricted to your local > filesystem only. > > Hope that helps. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php