<?
//***Configure Ping.fm's Custom URL to
//***point to the address for this file.
//***
//***Keep the file name secret because there
//***is no authentication required.


//****Edit this*****
$login = "USERNAME:PASSWORD";
//******************

$api = "http://army.twit.tv/api/statuses/update.xml";

$message = $_POST['message'];

$ch2 = curl_init();
curl_setopt($ch2, CURLOPT_URL, $api);
curl_setopt($ch2, CURLOPT_USERPWD, $login);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch2, CURLOPT_POST, 1);	
curl_setopt($ch2, CURLOPT_POSTFIELDS, "status=".rawurlencode(stripslashes($message))."&source=ping.fm bridge");

$gettwit2 = curl_exec($ch2);

curl_close($ch2);

?>