#!/usr/bin/perl

use CGI;

$query = new CGI;

$numer = $query->param('numer');
$msg = $query->param('tekst');

open(OUTPUT,"|~/bin/sms $numer");
print OUTPUT "$msg\n"; 
close OUTPUT;

print <<END
Content-type: text/html

<html>
<body>
<h2>Wiadomosc zostala wyslana</h2>
<em>Numer telefonu:</em> $numer<br>
<em>Tresc:</em><br>
<p>$msg</p>
</body>
</html>
END
