Background UDP message Transmission
I am new to webpages and scripting so this might be a simple problem to the more experienced.
What I am attempting to do is send a UDP message from a webpage to a external server app (outside webserver).
(Running Web server on linux system.)
To test this out I created a small webpage (one button) and when the button is clicked it calls a perl script that sends a test message. My problem is that I don't want the perl script to start a new webpage, I just need it to send the message in the background.
here is the webpage code:
<input type="button" name="custom_button_01" value="Rover 1" onclick="document.location.href= 'http://daystar/cgi-bin/second.pl';"/>
Here is the perl script:
my $message = IO::Socket::INET->new(Proto=>"udp",PeerPort=>4000,PeerAddr=>"10.6.6.1");
print "content-type: text/html\n\n";
print "Hello Perl";
if I leave out the last two lines so nothing is required to be displayed, I get an Internal Server Error
Premature end of script headers
Can anyone point me in the right direction.