#!/usr/bin/perl
use IO::Socket;

$username = "";		# b
$password = "";		# KX
$mobile = "09xxxxxxxx";	# q
$message = "²T";	# ²Te


$msg = "username=".$username."&password=".$password."&mobile=".$mobile."&message=".$message;

$Num = length $msg;
$MSGData = $MSGData."POST /json/sms_send.php HTTP/1.1\r\n";
$MSGData = $MSGData."Host: api.twsms.com\r\n";
$MSGData = $MSGData."Content-Length: ".$Num."\r\n";
$MSGData = $MSGData."Content-Type: application/x-www-form-urlencoded\r\n";
$MSGData = $MSGData."Connection: Close\r\n\r\n";
$MSGData = $MSGData.$msg."\r\n";

$sock  = IO::Socket::INET->new(Proto=>"tcp",PeerAddr=>"api.twsms.com",PeerPort=>80) || die &fail;
print $sock $MSGData;

@output=<$sock>;
close $sock;

$Res="";
foreach $item(@output){
	$Res = $Res.$resultofcheck.$item;	
};
print "ǰe:".$Res;
