MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /var/www/html/pathumthani_eoffice/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/pathumthani_eoffice/test.php
<? 

Function sendRequest($host,$method,$path,$data)
{
    
	//$method = strtoupper($method);
	$fp = fsockopen($host, 80);

	fputs($fp, "$method $path HTTP/1.1\r\n");
	fputs($fp, "Host: $host\r\n");
	fputs($fp,"Content-type: application/x-www-form-urlencoded\r\n");
	fputs($fp, "Content-length: " . strlen($data) . "\r\n");

	fputs($fp, "Connection: close\r\n\r\n");
	if ($method == 'POST') 
		{
			fputs($fp, $data);
		}

	while (!feof($fp)) 
		{
			$result .= fgets($fp,128);
		}
	fclose($fp);
	return $result;
}

function gwStatus($raw_socket_return) {
	$raw_socket_return = trim($raw_socket_return);
                $socket_status = "";
                $socket_return = explode("\n", $raw_socket_return);
				$count = count($socket_return);
				$iresult = $count-2;
				$socket_status = $socket_return[$iresult];
		return $socket_status;
	}
?>

<? 
$host="www.sms.in.th";
$method="POST";
$path="/tunnel/sendsms.php";

$RefNo="1001";//1001-9999
$Sender="pong";
$Msn="0861860538,0866769195";//for exemple 097694213 
$Msg="ทดสอบระบบ";
$MsgType="T";
$User="sapphire";
$Password="es53y7h";

$number_array = explode(',',$Msn);
foreach($number_array as $key => $val){
	$result=sendRequest($host,$method,$path,'RefNo='.$key.'&Sender='.$Sender.'&Msn='.$val.'&Msg='.$Msg.'&MsgType='.$MsgType.'&User='.$User.'&Password='.$Password);
}
//echo gwStatus($result);
 ?>

Anon7 - 2021