演示: wapf.aliapp.com/sign/getmyid/
@net909<?php
error_reporting(E_ALL);
echo '<?xml version="1.0" encoding="UTF-8"?><!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="application/xhtml+xml; charset=utf-8"/>
<meta http-equiv="Cache-control" content="no-cache" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=2.0"/>
<link rel="stylesheet" type="text/css" href="/sign/style.css">
<title>文网Myid获取</title>
</head>
<body>
<div class="title">文网Myid获取 [ <a href="javascript:history.back();">返回</a> ]</div>
<div class="content"><form action='?' method='GET'>
登录你的文网账户:<br/>用户名/手机号:<br/>
<input id='text' type='text' name='user' class="txt"/>
<br/>密码:<br/>
<input id='text' type='text' name='pwd' class="txt"/>
<p><input type='submit' id='submit' value='签到'/><input type="reset" value="重填" /></p></form>
</div>
<div class="read">提示:<br/>
文网:
http://3gwen.com/http://niqiai.com</div>
<?php
$user=$_GET['user'];
$pwd=$_GET['pwd'];
if(isset($user) && isset($pwd)){
$log_url="
http://wap.3gwen.com/hy/hydlcl.asp?myid=&dlfs=&urll=http://wap.3gwen.com/index.asp?myid=";//登陆url
$log_post="name={$user}&pass576={$pwd}";//登陆post
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$log_url);
curl_setopt($ch,CURLOPT_REFERER,$log_url);
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$log_post);
curl_setopt($ch,CURLOPT_TIMEOUT,60);//超时
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_HEADER,false);
$html=curl_exec($ch);
curl_close($ch);
preg_match("!myid=(.*)'>社区首页</a>!is",$html,$myid);
$myid=str_replace(array("'","<timer>",">"),"",$myid[1]);
$myid=strip_tags($myid);
if(strpos($html,'登陆成功')){
$str="登陆成功<br/><input value={$myid}>";
}
else{
$str="登陆失败";
}
echo $str;}
?>