|
|
|
A fun bit of code to be able to use NET SEND in a intranet environment. You will need to enable messenger services (not the msn messenger application) on 2000/XP to get this to work
The IP can be the IP of the receving computer, or the computer name if it has one. Enter '/users' to send to all users on a network.
This is tested on an XP machine running apache / php. Should have no issues on IIS / php machines
Now... the code
| <?php
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>
<?
}
?> | | |
|
| Class for sending mail with MIME attachments in multipart format using external sendmail, mimencode and zip Categories : Email, Network, PHP, PHP Classes | | | PHP4 HTTP Compression Speeds up the Web Categories : PHP, Zlib, HTML and PHP, HTTP, Network | | | WebServerSpy checks which kind of Webserver is running, Apache, Netscape, Fasttrack, IIS, HTTP-Header, HTTP 1.0, GET, spy, WWW Categories : HTTP, Network, Apache, PHP, Web Servers | | | Examines the user's computer for open Netbus (the trojan horse) port and reports the conclusion to the user. Categories : Network, PHP | | | Client classes for Dictionary servers UPDATED: 2000-06-06 Categories : Network, Search, Complete Programs, PHP Classes, PHP | | | whois domain name lookup dns url Categories : PHP, Search, Network | | | How to get the exit code and result of an exec() command. Categories : PHP, Network | | | Create MRTG Graphic from rrd database (Need MRTG and RRDTool installed). Categories : PHP, Network, Graphics | | | Sample usage of IPv6 and IPv4 with PHP Categories : PHP, PHP Classes, Network | | | IPTables Bandwidth statics Categories : PHP, Security, Network | | | An email validation script that actually checks against the recipient's mail server. Categories : Email, Complete Programs, PHP, Network, Debugging | | | Function that returns an IP Address if it's correct. IMPROVED!!! Categories : PHP, Algorithms, Network | | | redirect redirection ip address authentication authenticate addr Categories : Authentication, HTTP, Network, PHP | | | Class that allows the PHP developer to establish connections with a POP3 mail server amd be able to list, retrieve and delete mail messages from a given mail box.
Categories : Network, Email, PHP, PHP Classes | | | Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP, PHP, HTML, PDF, Excel | |
|
|
|