if($page eq "x1a.html")
{
$re_type = "a2";
$Q = ($prod) ? 'a0' : 'a0';
$send=$sec.$account.$year.$view;
}
if($page eq "x22.html")
{
$re_type = "x2";
$Q = ($prod) ? 'p0' : 'w0';
$send=$sec.$account.$year.$view;
}
if ($page eq "y11.html") {
$req_type = "y1";
$Q = ($prod) ? 'p0' : 'w0';
$send=$sec.$account.$year.$view.$action;
}
if ($send) {
got_send();
}
sub got_send {
my $socket;
my $x = '';
my @read = ();
my $host = ($prod) ? 'my.prod.com' : 'mytest.box.com';
my $port;
# Alternate depending on the time (in seconds)
($now[5] % 2) ? ($port = 6000) : ($port = 6100);
$AoH{300} = sprintf "%2s(%d) %s", $QPro, ($port/100), $send;
$socket = IO::Socket::INET->new( "$host:$port" ) or &error;
print $socket "\n
\n
\n
$re_type\n
$send\n
$Q
\n
\n";
$x = <$socket>;
close(Server);
$x=~s/\n' } # Prevent uninitialzed message on $1
$y=~/<(.*?)>(.*)/;
if($1 eq "7"){$name = $2;}
#more code here....
last if ($x =~ /^[\s\x00]*$/);
}
} #End of sub