Net Send con php 
Tuesday, July 31, 2012, 06:33 PM - Php
en xp tienen que comprobar si el programa netsend esta activado , si es uno de esos xp remodelados es posible que no este instalado para disminuir tamaño





<?
if(!isset($_POST['submit'])){
show_form();
}else{
//get message
if (isset($_POST['message'])){
$mess = escapeshellcmd($_POST['message']);
}else{
echo "no message";
show_form();
die();
}
//$ip is the ip of your friends machine...you could build a db table or array to use the name entry to find the ip
if (isset($_POST['ip'])){
$ip = escapeshellcmd($_POST['ip']);
}else{
echo "no ip";
show_form();
die();
}
echo "NET SEND $ip $mess";
exec("NET SEND $ip $mess");

}
function show_form()
{
?>
<form method="POST" action="<?=$_SERVER['PHP_SELF'];?>">
<table cellpading=2 cellspacing=2 border=2 width=50%>
<tr>
<td align=center valign=top>
<p>IP<br>
<input type="text" name="ip" size="20"></p>
</td>
</tr>
</table>
<table cellpading=2 cellspacing=2 border=2 width=50%>
<tr>
<td align=center valign=top>
<p>Message<br>
<textarea cols=40 rows=4 name="message"></textarea>
<p><input type="submit" name="submit" value="Send"></P>
</td>
</tr>
</table>
<?
}
?>

Comentarios

Agregar comentario

Rellene los campos de abajo para dejar su comentario.









Extras (Negrita / Cursiva / URL / Imagen):








En este blog está activada la moderación. Tu comentario requiere que los administradores lo aprueben antes de hacerse visible.