To view the route from a webserver(for windows) to a site I made this script.I uses the dos command tracert, however it's a very slow(but that's normal for tracert).but the script only shows the information at the end of the the tracert session (if i execute the script without a webserver I see the information when it comes avaible.
Is it possible to write to the browser when the program is still running?
#!c:\perl\bin\perl.exe
$test = $ENV{QUERY_STRING};
if ($test =~ /^url=(h?t?t?p?:?\/?\/?\w*\.?\w*\.?\w*\.\w*\/?~?\w*)/ ) {
open(TRACE, "tracert $1 |"
print "Content-type: text/html\n\n";
while(<TRACE>) {print $_ . "<br>";}
close(TRACE);
} else {
print "Content-type: text/html\n\n<h1>Error!!!</h1>" }
Is it possible to write to the browser when the program is still running?
#!c:\perl\bin\perl.exe
$test = $ENV{QUERY_STRING};
if ($test =~ /^url=(h?t?t?p?:?\/?\/?\w*\.?\w*\.?\w*\.\w*\/?~?\w*)/ ) {
open(TRACE, "tracert $1 |"
print "Content-type: text/html\n\n";
while(<TRACE>) {print $_ . "<br>";}
close(TRACE);
} else {
print "Content-type: text/html\n\n<h1>Error!!!</h1>" }