Code:
<div style="position:absolute;left:250;top:50;width:750;height:768;">
<table width=750 height=768 border=0 cellpadding=0 cellspacing=0>
<tr valign="top">
<td bgcolor="#1E1E1E">
<iframe name="I1" height="100%" width="100%" src="">
</iframe>
</td>
</tr>
</table>
</div>
The above gives me a text box on a web page, but how can I display data from a log file on a server back to that text box?
Code:
#!/usr/bin/perl
use IO::Socket;
use IO::Handle;
use IO::Seekable;
my $sock = new IO::Socket::INET (
PeerAddr => 'localhost',
PeerPort => '7183',
Proto => 'tcp',
);
die "Could not create socket: $!\n" unless $sock;
$data_file = "test1.dat";
open(DAT, $data_file) || die "Could not open file: $!\n";
for (;;) {
while (<DAT>) {
my $msg = $_;
chomp $msg;
print $sock "$msg\n";
}
sleep 1;
DAT->clearerr();
}
close(DAT);
close($sock);
print $sock "$msg\n"; I want returned to the html page inside the text box.
Thanks.