function.php
2014-08-25 05:05:31 -0400
<?php
/*** *** *** *** *** *** *** *** *** *
* 年华大乐斗挂机程序核心函数文件
* 2013-10-20
* 版权: 年华
* QQ:1538930807
* 官网:NIANHUA.A3W.CN
* 未经同意,请勿进行剪切与复制!
* 剪切与复制,请保留版权!
* *** *** *** *** *** *** *** *** *** */
function openu($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, "MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
function curlpost($url,$data){
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_USERAGENT,'TTMobile/09.03.18/symbianOS9.1 Series60/3.0 Nokia6120cAP3.03');
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$content=curl_exec($ch);
curl_close($ch);
Return $content;
}
##模拟浏览器提交post代码由MTG团队编写,授权使用务必保留。。。
function check($qq,$str,$sid){
preg_match('/<a.*href=("|\').*sid=(.*)\\1.*>.*<\/a>/iU',$str,$sid);
Return "QQ: <input type='text' value='{$qq}'/><br>SID: <input type='text' value='{$sid[2]}'/><br>恭喜,获取SID成功<hr><a href='index.php?action=add&qq={$qq}&sid={$sid[2]}'>添加到大乐斗挂机精灵</a>";
}
##自定义添加内容
?>
Back to home
Subscribe |
Register |
Login
| N