socket編程實現自動向百度空間添加文章

<?php
require_once './socket.php';// socket編程類文件

$data = array();
$data['title'] = 'just a test';
$data['content'] = 'this is content test';
$data['private'] = 0;
$data['imgnum'] = 0;
$data['bdstoken'] = 'bfc12112a723c000e76e611044d9d351';
$data['qbid'] = '48a6d9fc6756dd15ce9f32c3';
$data['refer'] = 'http://hi.baidu.com/home';
$data['multimedia'] = '';
$data['synflag'] = '';
$data['private1'] = 0;
$data['qing_request_source'] = 'new_request';

$url = "http://hi.baidu.com/pub/submit/createtext";

$http = new Http($url);
$http->setHeader("Cookie: 你在百度的cookie");

$http->setHeader("Referer: http://hi.baidu.com/home");


echo $http->post($data);
?>
相關文章
相關標籤/搜索