Shane,
You haven't told us what the problem is, only that you're having trouble
making it work. How is it not working? One other question: I have to
assume that the script is running on a different server than the one
your are trying to write to (otherwise, why use ftp?) - are you sure
that the ftp server on that system supports passive ftp? In any case,
fopen may not be the best approach to meet your needs, but you need to
tell us more about what the actual problem is.

..michael..

On Wed, 2002-07-31 at 16:26, Shane wrote:
> Looked in the archive and manual and came up with no luck, so here it goes.
> 
> My end result is to save the output of a PHP script as an HTML file in a specified 
>directory on a WIN2K server.
> 
> my script is such...
> <? PHP
> function save_archive(){
> $filename = "http://myserver.net/extranet/archive.php?jobid=1";;  
> $fd = fopen( $filename, "r" ); 
> $fd2 = fopen("ftp://me:[EMAIL PROTECTED]/extranet/test2.html";, "w");
> 
> while (!feof($fd)) { 
>     $line = fgets($fd, 1024); 
>     fputs($fd2,$line); 
>       } 
> 
> fclose($fd); 
> fclose($fd2); 
> }
> ?>
> 
> I'm having a terrible time getting this to work. Is there a better way? Or can 
>someone point me toward or post an example of some working function I could study???
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to