Heim  >  Artikel  >  php教程  >  PHP 发送博文到百度空间

PHP 发送博文到百度空间

WBOY
WBOYOriginal
2016-06-06 20:09:261037Durchsuche

昨天,测试了PHP方式登录百度空间,可以参见博文《PHP 登录百度空间》,今天通过抓包工具的分析,分析了博文的发布过程,实现了博文的自动发布。 参照代码如下: private function postArticle($baiduzoneurl, $title, $content, $category, $blogpower){$po

昨天,测试了PHP方式登录百度空间,可以参见博文《PHP 登录百度空间》,今天通过抓包工具的分析,分析了博文的发布过程,实现了博文的自动发布。

参照代码如下:

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插件的更新,哈哈,这个就快多了!!!

The post PHP 发送博文到百度空间 appeared first on 润物无声.

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn