On Sat, 12 Feb 2000 [EMAIL PROTECTED] wrote:

> As a beginner in Mod_perl,
> I have to get the file from the remote host (Mod_perl enabled Apache)
> if not in the local host, so I am currently modifying SendFile.pm in Eagle 
> book
> at
> > unless(-e $r->finfo) {
>      ...
>      instead of giving the nonexistence error message here
>      get the file from the remote host ( I assume the file exist there)
>      by connecting to the remote host using Socket here 
>      ...
>     }
>  
> But I have difficulties in setting up Socket connection to the remote.
> Can I use just simple Perl Socket here (IO::Socket) ?

  Are you trying to get a file via HTTP? If so check out the
LWP::lwpwww-5.47 module at CPAN.  It will handle and the socket
connections for you and reduce retrieveing a file to "get($URL);".  

  Note I haven't attempted to use this in a mod_perl setting, but I can't
imagine any reason why it shouldn't work. 

 -------------------------------
  Frank Wiles <[EMAIL PROTECTED]>
  http://frank.wiles.org
 -------------------------------

Reply via email to