菜鸟求教个菜问题,这个php签到源码,我想通过提交个URL来传参数并执行自动签到,要怎么?多谢!! 本帖最后由 tangdeli98 于 2013-12-16 14:08:46 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $id=$_POST["id"];$pw=$_POST["pw"];這是用post方法來獲取數據$id=$_REQUEST['id'];這樣寫就可以同時從post和get方式獲取數據了. 那我只要头部这两个POST改一下就可以呵?其它地方还需要改吗?多谢!! 你可能要研究一下php的curl,用curl模擬提交即可. 不会php, 求帮忙呢.是不是这个源码里加一句什么就可以呢?第98行应该就是签到(前面是先登录),是不是这句后面加个什么呢? 多谢!! 我簡單修改了一下,你測試下<?PHPset_time_limit(0);ini_set('display_errors','on');error_reporting(E_ALL);header('Content-type: text/html; charset=UTF-8');$id=(isset($_REQUEST["id"])) ? trim($_REQUEST["id"]) : '';$pw=(isset($_REQUEST["pw"])) ? trim($_REQUEST["pw"]) : '';$do=(isset($_REQUEST["do"])) ? trim($_REQUEST["do"]) : '';if($id!='' and $pw!=''){ setcookie("id",$id); setcookie("pw",$pw);}header("Content-type: text/html; charset=UTF-8");$cookie_file = dirname(__FILE__)."/cookie_".md5(basename(__FILE__)).".txt";date_default_timezone_set('PRC');function httpreq($url,$getcookie=0){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, "Dalvik/1.6.0 (Linux; U; Android 4.1.1; MI 2SC MIUI/JLB14.0)"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $getcookie?curl_setopt($ch, CURLOPT_COOKIEJAR, $GLOBALS['cookie_file']):curl_setopt($ch, CURLOPT_COOKIEFILE, $GLOBALS['cookie_file']); $result = curl_exec($ch); curl_close($ch); return $result;}?><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="shortcut icon" href="http://sovi.cc/favicon.ico" /><title>签到</title> <style type="text/css"> body{text-align:center; margin:0 auto; font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px; background-color:#EAEAEA; } .main{text-align:left; word-wrap:break-word; overflow:hidden;padding:5px; background:#FFFFFF; border:1px solid #C6C6C6; } .nav{padding:1px; background:#FFFBE1; border:1px solid #FEBF90; } .ButtonCss{ font-family: "Tahoma", "宋体"; font-size:9pt; color: #003399; border: 1px #003399 solid; color:006699; BORDER-BOTTOM: #93bee2 1px solid; BORDER-LEFT: #93bee2 1px solid; BORDER-RIGHT: #93bee2 1px solid; BORDER-TOP: #93bee2 1px solid; background-color: #e8f4ff; CURSOR: hand; font-style: normal ; width:60px; height:22px; } a{ text-decoration:none;color:#0A63BB; } a:hover{text-decoration:underline;color:#DE0000; } img,a img{border:none } .form { position:static; z-index:1000; background:gray; background-color:#FFCC00; filter : progid:DXImageTransform.Microsoft.DropShadow(color=#FF404040,offX=2,offY=2,positives=true); } .tip{color:#DE0000; } </style></head><body> <form method="post" action="?do=vi"> 帐号<br/> <input type="text" name="id" size="20" value="<?php echo $id; ?>"/><br/> 密码<br/> <input type="password" name="pw" size="20" value="<?php echo $pw; ?>"/><br/> <input type="submit" class="ButtonCss" /> </form><?phpif($id!='' and $do=='vi'){ $rang=rand(333,8888); $url="http://im.uxin.com:8887/login?sn=".$rang."&account=".$id."&pwd=".md5($pw)."&pv=android&v=2.8.4&sign=".md5($rang.$id."k1oET&Yh7@EQnp2XdTP1o/Vo=")."&netmode=1&brand=Xiaomi&model=MI+2SC&osv=4.1.1&imei=".rand(10000,99999).rand(10000,99999).rand(10000,99999); $cont=httpreq($url,1); if(strstr($cont,'uid')){ echo "登录成功<br/>"; }else{ echo "登录失败<br/>"; } $url="http://im.uxin.com:8887/signin?sn=".$rang."&sign=".md5($rang."k1oET&Yh7@EQnp2XdTP1o/Vo="); $content=json_decode(httpreq($url),true); //echo $content['content']; echo '<pre>',var_dump($content),'</pre>'; die();}?><br/> 时间:<?php echo date("Y-m-d H:i:s")?><br/> <a href="http://s.c/">网站首页</a><br/> Copyright<font color="red">vi1.c</font>.All Rights Reserved<br/></body></html> 多谢!!测试还是不行,提交url后只填了表单: 如何采集防采集的网站 php验证码类 session问题 php从linux服务器得到的结果乱码 求個簡單的計數機,請高手幫忙,急急急 出个郁闷了几天的问题? 这个文件是百度编辑器的图片上传部分.我想给编辑器上传的图片加上水印..... 怎能么才能用for语句,把数据库中的数据输出呀,我这样写为什么不对,应该怎么修改 在php4.3.1中mail90函数不能使用么? 在线等待 vBulletin 2.2.5 Released php批量上传图片后如何修改 PHP 5.5.7/5.4.23/5.3.28 紧急发布 PHP CodeIgniter 截取数据
$pw=$_POST["pw"];
這是用post方法來獲取數據$id=$_REQUEST['id'];
這樣寫就可以同時從post和get方式獲取數據了.
<?PHPset_time_limit(0);
ini_set('display_errors','on');
error_reporting(E_ALL);
header('Content-type: text/html; charset=UTF-8');$id=(isset($_REQUEST["id"])) ? trim($_REQUEST["id"]) : '';
$pw=(isset($_REQUEST["pw"])) ? trim($_REQUEST["pw"]) : '';
$do=(isset($_REQUEST["do"])) ? trim($_REQUEST["do"]) : '';if($id!='' and $pw!=''){
setcookie("id",$id);
setcookie("pw",$pw);
}
header("Content-type: text/html; charset=UTF-8");
$cookie_file = dirname(__FILE__)."/cookie_".md5(basename(__FILE__)).".txt";date_default_timezone_set('PRC');function httpreq($url,$getcookie=0){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, "Dalvik/1.6.0 (Linux; U; Android 4.1.1; MI 2SC MIUI/JLB14.0)");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$getcookie?curl_setopt($ch, CURLOPT_COOKIEJAR, $GLOBALS['cookie_file']):curl_setopt($ch, CURLOPT_COOKIEFILE, $GLOBALS['cookie_file']);
$result = curl_exec($ch);
curl_close($ch); return $result;
}?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="http://sovi.cc/favicon.ico" />
<title>签到</title>
<style type="text/css">
body{text-align:center;
margin:0 auto;
font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;
background-color:#EAEAEA;
}
.main{text-align:left;
word-wrap:break-word;
overflow:hidden;padding:5px;
background:#FFFFFF;
border:1px solid #C6C6C6;
}
.nav{padding:1px;
background:#FFFBE1;
border:1px solid #FEBF90;
}
.ButtonCss{
font-family: "Tahoma", "宋体";
font-size:9pt; color: #003399;
border: 1px #003399 solid;
color:006699;
BORDER-BOTTOM: #93bee2 1px solid;
BORDER-LEFT: #93bee2 1px solid;
BORDER-RIGHT: #93bee2 1px solid;
BORDER-TOP: #93bee2 1px solid;
background-color: #e8f4ff;
CURSOR: hand;
font-style: normal ;
width:60px;
height:22px;
}
a{
text-decoration:none;color:#0A63BB;
}
a:hover{text-decoration:underline;color:#DE0000;
}
img,a img{border:none
}
.form
{
position:static;
z-index:1000;
background:gray;
background-color:#FFCC00;
filter : progid:DXImageTransform.Microsoft.DropShadow(color=#FF404040,offX=2,offY=2,positives=true);
}
.tip{color:#DE0000;
}
</style>
</head>
<body>
<form method="post" action="?do=vi">
帐号<br/>
<input type="text" name="id" size="20" value="<?php echo $id; ?>"/><br/>
密码<br/>
<input type="password" name="pw" size="20" value="<?php echo $pw; ?>"/><br/>
<input type="submit" class="ButtonCss" />
</form>
<?php
if($id!='' and $do=='vi'){
$rang=rand(333,8888);
$url="http://im.uxin.com:8887/login?sn=".$rang."&account=".$id."&pwd=".md5($pw)."&pv=android&v=2.8.4&sign=".md5($rang.$id."k1oET&Yh7@EQnp2XdTP1o/Vo=")."&netmode=1&brand=Xiaomi&model=MI+2SC&osv=4.1.1&imei=".rand(10000,99999).rand(10000,99999).rand(10000,99999);
$cont=httpreq($url,1);
if(strstr($cont,'uid')){
echo "登录成功<br/>";
}else{
echo "登录失败<br/>";
}
$url="http://im.uxin.com:8887/signin?sn=".$rang."&sign=".md5($rang."k1oET&Yh7@EQnp2XdTP1o/Vo=");
$content=json_decode(httpreq($url),true);
//echo $content['content'];
echo '<pre>',var_dump($content),'</pre>';
die();}
?><br/>
时间:<?php echo date("Y-m-d H:i:s")?><br/>
<a href="http://s.c/">网站首页</a><br/>
Copyright<font color="red">vi1.c</font>.All Rights Reserved<br/>
</body>
</html>