2008.04.10 9:40 bruce:
为了盯一个过期的cn域名,写了个自动程序每天早上4:00-4:30查过期域名状态,然后通过jiwai悄悄话发给自己,自己手机绑定了消息到手机,睡觉也能惊醒。
结果tmd还是没抢赢那些职业的傻B“奥美新”、李九龙。那些简直不是人。即时昨晚起床了也不可能1分钟内搞定,后悔没看cnnic的到期列表,不然早上4:08分直接就1元钱点击了。哎,算了,不能便宜那帮孙子,不要也没什么损失。
贡献C#访问JIwai的代码:
public void postjiwai(string msg)
{
try
{
byte[] retBytes = null;
WebClient webClient = new WebClient();
webClient.Headers.Add(“Content-Type”, “application/x-www-form-urlencoded”);
NetworkCredential nc = new NetworkCredential(“your id”, “your password”);
webClient.Credentials = nc;
String status = HttpUtility.UrlEncode(“D bruce ” + msg);
//D user message 悄悄话
//@user message 发消息
//message 自己留言
retBytes = webClient.UploadData(“http://api.jiwai.de/statuses/update.xml“, “POST”, System.Text.Encoding.Default.GetBytes(“status=” + status));
String retString = System.Text.Encoding.UTF8.GetString(retBytes);
Console.WriteLine(retString);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
