I set up a web based interface that our office users can utilize to send instant messages via the Windows Net Send command.
The users names are pulled from a MySQL database. I also used an old javascript I pull from the internet years ago to put
the messaging screen in a pop-up format. It uses 4 files to complete the task although the second and third pages could be
combined. The 4th file is the batch file built on the third page.
/* Put this link on your main page or wherever you want to place the link*/
//Save this as file1.php or again whatever you choose to call it
<BODY bgcolor="#99ccff" text="#000000" vlink="#FFD700" link="#800000">
<?php
//I use an inc file to hold the database connection info
include("connect1.inc");
@MYSQL_SELECT_DB($dbname) or die ("Unable to select database");
$sql="SELECT * FROM table order by usr desc";
/* usr is the field name in the database that contains the message receiptants name the table also holds the computer host name */
$result=mysql_query($sql);
$num=mysql_numrows($result);
$row = mysql_fetch_array($result);
mysql_close();
$i=0;
include("connect1.inc"); // again I use an inc file to house the database connection info
@MYSQL_SELECT_DB($dbname) or die ("Unable to select database");
$sql="SELECT * FROM tablewhere usr like '%$sfield%' ";
$result=mysql_query($sql);
$num=mysql_numrows($result);
$row = mysql_fetch_array($result);
$i=0;
mysql_close();