CODE:
<?
function sendmsg($from, $text)
{
include('WebIcqLite.class.php');
define('UIN', 111111111);
define('PASSWORD', 'password');
$icq = new WebIcqLite();
if($icq->connect(UIN, PASSWORD))
{
if(!$icq->send_message($from, $text))
{
echo $icq->error;
}
else
{
echo 'Message sent';
}
$icq->disconnect();
}
else
{
echo $icq->error;
}
}
@$from = $_POST['from'];
@$text = $_POST['text'];
if ( ($from!='') and ($text!='') ) sendmsg($from, $text);
?>
<form method=post>
<input type=text name=from>
<textarea name=text></textarea>
</form>
|