WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : NET SEND a popup to windows lan computers
Categories : PHP, Network Click here to Update Your Picture
bastien koert
Date : Jun 03rd 2004
Grade : 2 of 5 (graded 5 times)
Viewed : 16303
File : No file for this code example.
Images : No Images for this code example.
Search : More code by bastien koert
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

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