代码拉取完成,页面将自动刷新
<?php
$access_token = '100266584';
$oauth_consumer_key = '2e499a2c58e20f1adb74c31d497a96b4';
$openid = 'F76FAE0544CF6A04343C430F24375FE5';
$format = 'json';
$content = 'Mon Apr 30 2012 17:50:20 GMT 0800 (йʱ)';
$result;
$port = 80 | 443;
$host = 'graph.qq.com/t/add_t';
$method = 'POST';
// $contenttype = 'text/html' | 'text/plain' | 'text/xml';
$params=array(
'access_token' => $access_token,
'oauth_consumer_key' => $oauth_consumer_key,
'openid' => $openid,
'format' => $format,
'content' => $content
);
if ($port == 443) {
$sshhost = 'ssl://'.$host;
} else {
$sshhost = $host;
}
$fp = fsockopen($sshhost,$port);
$content = http_build_query($params);
fwrite($fp, "POST /reposter.php HTTP/1.1\r\n");
fwrite($fp, "Host: $host\r\n");
fwrite($fp, "Content-Type: application/x-www-form-urlencoded\r\n");
fwrite($fp, "Content-Length: ".strlen($content)."\r\n");
fwrite($fp, "Connection: close\r\n");
fwrite($fp, "\r\n");
fwrite($fp, $content);
header('Content-type: text/plain');
while (!feof($fp)) {
$result.= fgets($fp, 1024);
}
fclose($fp);
echo $result;
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。