<?php
$src=$_GET["src"];
$dst=$_GET["dst"];

$socket = @fsockopen("127.0.0.1","5038", $errno, $errstr, $timeout);

$cmd[]="
Action: Login
UserName: rodrigo
Secret: a1s2d3f4

Action: DongleSendSMS
Device: dongle0
Number: $src
Message:$dst
Action: Logoff

";


$lines=$cmd;

foreach ($lines as $line_num => $line) {
 fwrite($socket, "$line\r\n");
 //echo $line;
 //echo fread($socket, 128);
}
sleep(5);
fclose($socket);
echo "Ligou";
header('Location:index.html');
?>
