The below function will allow you to send a DM to a Twitter user (assuming you are there friend). There is no success / failure checking with this function (I’m not going to make it too easy for you.)
<?php
# @purpose To send direct messages on Twitter.
# @param $to Who you want the message to go to.
# @param $message The content of the message.
# @param $username The username of the twitter user to send the message from.
# @param $password The password of the twitter user to send the message from.
# @returns Nothing.
# @changelog 15/03/2008 Mark Dalby function declare complete.
# @docend
function twitter_send_dm($to, $message, $username, $password)
{
define(’POSTURL’, “http://$username:$password@twitter.com/direct_messages/new.json”);
define(’POSTVARS’, “user=$to&text=$message”);
$ch = curl_init(POSTURL);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, POSTVARS);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
exit;
}
?>






Hello from Russia!
Can I quote a post in your blog with the link to you?
Of course you can