1 Star 0 Fork 0

姚文强/mycss3demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sock.php 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
姚文强 提交于 2012-05-01 15:28 . dd the get info block
<?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;
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/yaowenqiang/mycss3demo.git
git@gitee.com:yaowenqiang/mycss3demo.git
yaowenqiang
mycss3demo
mycss3demo
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385