chdir $FindBin::Bin; # chdir to the directory of this perl script
-my $d = new HTTP::Daemon LocalPort => 8083;
+$drawgraphport = $ENV{'DRAW_GRAPH_PORT'} || $drawgraphport;
+
+my $d = new HTTP::Daemon LocalPort => $drawgraphport
+ or die "Error: port $drawgraphport not available.";
print "Please contact me at: <URL:", $d->url, ">\n";
$SIG{CHLD} = "IGNORE"; # do not accumulate defunct processes
my $http_query = $r->url->equery;
my $cgi = new CGI("$http_query");
my $url = $cgi->param('url');
- $url = uri_unescape($url).'¶m.PID='.$$;
+ $url = $url.'¶m.PID='.$$;
print "URL: $url\n";
my $ua = LWP::UserAgent->new;