这段asp怎么写成php的
<%@ CODEPAGE=936 %>
<%
If Request("submit")<>"" Then
Dim xmlhttp
Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")
Response.Cookies("save_username")=Request("username")
Response.Cookies("save_username").Expires=Date+365
Response.Cookies("save_password")=Request("password")
Response.Cookies("save_password").Expires=Date+365
username = Request("username")
password = Request("password")
post_status = "status=" + server.URLencode(Request("updateStatus"))
If Request("twitter") = 1 Then
xmlhttp.Open "POST", "http://" & username & ":" & password & "@twitter.com/statuses/update.xml", False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=gb2312"
xmlhttp.setRequestHeader "Content-Length", Len(post_status)
xmlhttp.Send (post_status)
Response.Write "twitter OK." 'xmlhttp.responseText
End If
是同步twitter的代码,怎么写成php的,或者谁有现成的同步代码