昨天,测试了PHP方式登录百度空间,可以参见博文《PHP 登录百度空间》,今天通过抓包工具的分析,分析了博文的发布过程,实现了博文的自动发布。
参照代码如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | private function postArticle($baiduzoneurl, $title, $content, $category, $blogpower) { $post_data = array(); $post_data["title"] = $title; $post_data["tags[]"] = $category; $post_data["content"] = $content; $post_data["private"] = $blogpower == 0? "" : "1"; $post_data["imgnum"] = "0"; $post_data["bdstoken"] = $this->bdstoken; $post_data["qbid"] = ""; $post_data["refer"] = "http://hi.baidu.com/home"; $post_data["multimedia[]"] = ""; $post_data["private1"] = $post_data["private"]; $post_data["synflag"] = ""; $post_data["qing_request_source"] = "new_request"; $this->doHttpPost("http://hi.baidu.com/pub/submit/createtext", $post_data, "http://hi.baidu.com/pub/show/createtext"); } |
private function postArticle($baiduzoneurl, $title, $content, $category, $blogpower) { $post_data = array(); $post_data["title"] = $title; $post_data["tags[]"] = $category; $post_data["content"] = $content; $post_data["private"] = $blogpower == 0? "" : "1"; $post_data["imgnum"] = "0"; $post_data["bdstoken"] = $this->bdstoken; $post_data["qbid"] = ""; $post_data["refer"] = "http://hi.baidu.com/home"; $post_data["multimedia[]"] = ""; $post_data["private1"] = $post_data["private"]; $post_data["synflag"] = ""; $post_data["qing_request_source"] = "new_request"; $this->doHttpPost("http://hi.baidu.com/pub/submit/createtext", $post_data, "http://hi.baidu.com/pub/show/createtext"); }
接下来再进行wordpress插件的更新,哈哈,这个就快多了!!!
什么时候出wordpress的更新插件啊?
@周润生: 插件又不能用了。