|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi
Does anybody have a suggestion for the following situation: There are five web developers running Personal Web Server and/or IIS on their workstation. Is there a way to routinely run a script to go to each Developers' server and copy everything from their wwwroot directory? I'd like to backup their websites on a separate dedicated workstation. I'd also like to grab dynamic pages with the code intact (like ASP PHP CGI) - I'm not sure whether one can even grab the code without it being processed. Any suggestions would be greatly appreciated. Thanks, mcsimon |
|
#2
|
||||
|
||||
|
Hi!
I don't know of a way to make a server spit out code instead of executing it like usual. I just thought of running some lightweight ftp server on each workstation (serv-u or something) that serves each webserver's docroot. Then you could easily retrieve all files directly from disk by Net::FTP I know this is not a graceful solution, sorry. Greetings, Atrus. |
|
#3
|
|||
|
|||
|
Atrus,
I think that's a great solution. I can set up an ftp server on each machine and grab the files using NET::ftp. I didn't think there was a way to grab code via a web server without it being executed. You've given me enough to go on and to keep busy for a while. Thanks! adios, mcsimon ![]() |
|
#4
|
|||
|
|||
|
Grab perl code off cgi-bin example
Try this:
#!c:/perl/bin/perl # Name this file fun.pl or change open name # Send file as contents if " IP address is correct " arrives $Terminator = $ENV{'REMOTE_ADDR'}; if ($Terminator eq "xxx.xxx.xxx.xxx") { print"Content-type: text/plain\n\n"; open(FILE,"<fun.pl"); while(<FILE>){ print $_; } close(FILE); } # end of sending out fun.pl # Regular code starts here or ..... # Kinda risky for security (maybe) print"Content-type: text/html\n\n"; print "Hello World\n"; might work well with socket connection to servers with files Best to remove before use in production.
__________________
Thanks Foot in Mouth ver 1.2.5 Onion |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Interesting Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|