Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: del nemokamu sms skripto

Parašė BloodKiller· 2007 Spa. 7 17:10:44
#8

;)

<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1257'>
<title>SMS siuntimas</title>
<style>
body {
   font-size: 11px;
   font-family: Verdana;
}

input {
   font-size: 11px;
   font-family: Verdana;
   border: 1px solid #005278;
}

table {
   font-size: 11px;
   font-family: Verdana;
}

textarea {
   font-size: 11px;
   font-family: Verdana;
   border: 1px solid #005278;
}
</style>
</head>
<body>
<?php
$server = "sms.reboot.lt";
if (isset($_POST['sendmessage'])) {
   $phone_number = str_replace("+3706","",$_POST['phone_number']);
   $message = $_POST['message'];
   if (preg_match("/^[0-9]{7,7}+$/i",$phone_number) && strlen(str_replace(' ','',$message)) > 0) {
      $socket = fsockopen("195.175.37.71",8080,$errno,$errstr,30);
      $post = "numb=$phone_number&text=$message";
      if ($socket) {
         $pst = "GET http://$server/index.php?numb=$p...t=$message HTTP/1.1\r\n";
         $pst .= "Host: $server\r\n";
         $pst .= "Connection: Close\r\n\r\n";
         fwrite($socket,$pst);
         $html = '';
         while (!feof($socket)) $html .= fgets($socket);
         fclose($socket);
         $html = explode("snd.innerHTML='",str_replace("'; alert('SMS tekstas gautas!');","",$html));
         echo "<center><font color='#009900'>SMS gautas</font><br>\n<b>Pranešimas:</b> ".str_replace("'","",$html[1])."</center>\n<br>\n";
      }
   } else {
      echo "<center>Blogai įvestas numeris</center>\n<br>\n";
   }

}
echo "<form method='post' action=''>
<table align='center'>
<tr><td><b>Numeris:</b></td><td><input name='phone_number' value='+3706' style='width:250px;'></td></tr>
<tr><td valign='top'><b>Tekstas:</b></td><td><textarea name='message' style='width:250px;height:150px;'></textarea></td></tr>
<tr><td></td><td><input type='submit' name='sendmessage' value='Siųsti SMS'></td></tr>
</table>
</form>\n";
?>
</body>
</html>