in reply to Is there a module to copy files from remote machines to my web server?

The nearly-standard LWP family of modules is probably what you want, if you're trying to nab a web page. It can be as simple as:

use LWP::Simple; my $code = getstore ('http://www.foo.com/stuff/gewgaws.html', '/my/fil +e/gewgaws.html'); print "Succeeded!\n" if $code == 200;

If you're using some protocol other than HTTP, check out Net::FTP and the like.

As for writing a client from scratch that will do the job, well ... you're probably better off telling those who get the client to get LWP, if you're distributing the client; and if it's that you don't administer the client machine, look into installing the LWP modules into directories you can write to. How to do this is covered in perlmodinstall.

HTH

Philosophy can be made out of anything. Or less -- Jerry A. Fodor

Replies are listed 'Best First'.
Re: Re: Newbie needs help
by smonk (Initiate) on Mar 26, 2001 at 21:59 UTC
    Thanks arturo. I think I did not communicate clearly as to my problem statement. I would like to get a file from the client's site. One they will point to when required. I have to then copy the file over to my web site. Access to my site will be through authentication. I will try and understand what you have said, and see if that helps.

      So, is your situation like this? You have a number of clients who need to be able to update files on your server which runs IIS? They will initiate the uploading process, and they need to be authenticated? (if so, how?)

      A reasonably standard way of handling this sort of thing would be to have your IIS machine run a CGI program that accepts file uploads; LWP is powerful enough to handle form submissions, including file uploads. If you search this site on "file uploads" you'll get more info than you want right now on how to write the CGI program. As for the client software, (the one that would use LWP) there's a book by Clinton Wong on writing Web Clients in Perl (published by O'Reilly and Associates that you might check out (if follow the link, there may even be a sample chapter).

      An alternate option is to handle the whole thing with FTP, with your IIS machine being the FTP server that accepts uploads; Net::FTP is the standard Perl way of writing an FTP client.

      HTH!

      Philosophy can be made out of anything. Or less -- Jerry A. Fodor