0 replies
Yes, this works.
It might need some approving.
Please, post a updated version if you do.

I includes it with: <?php include('tweet.php'); ?>

Code:
<?php
$username = $_POST['username'];
$password = $_POST['password'];

$tweet = "Visit this url: http://tools.homebiznizz.net/ for moneymaking tools...";

$status = urlencode(stripslashes(urldecode($tweet)));

if ($status) {
$tweetUrl = 'http://www.twitter.com/statuses/update.xml';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "$tweetUrl");
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, "status=$status");
curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");

$result = curl_exec($curl);
$resultArray = curl_getinfo($curl);

if ($resultArray['http_code'] == 200)
echo '<br />Tweet Posted<br /><br />';
else

curl_close($curl);
}

?>
<form 
id="form1" 
name="form1" 
method="post" 
action="<?php echo $_SERVER['PHP_SELF'] ?>"
>
<p><strong>Tweet this webpage:</strong><br />
Twitter username:<br />
<input name="username" type="text" id="username" />
<br>
Twitter password:<br />
<input name="password" type="text" id="password" />
<br>
Your Twitter username <br>
and password will <br>
NOT be recorded!.<br />
<input name="Submit" type="submit" id="Submit" value="Tweet!" />
</p>
</form>
#form #tweet #webpage

Trending Topics