-
- //Forum api login interface address
- $uri = "http//www.wap.com/ssdfasdfsf"
- //Parameter array
- $data = array(
- 'username' => 'username',
- 'password' => 'password',
- );
- //Operation execution
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $uri);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_HEADER,1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
- curl_exec($ch);
Copy code
Unify the two-day sessionid generation mechanism and transform forum wap users Authentication method.
2. Use PHP to implement QQ hang-up program
QQ hang-up is very popular nowadays. Recently I saw a certain expert wrote this piece of php code to implement QQ hang-up, so I would like to share it with you.
Network manager u.bitsCN.com
PHP code:
-
- $qq = "100000"; //qq number
- $pwd = "123456"; //Password
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "http ://211.139.167.71/waptest/TWF/qqportal/rela/updateuserinfo.jsp");
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); //This line is to set whether curl follows the location sent by the header.
- Important
- curl_setopt($ch, CURLOPT_POST, 1);
- //curl_setopt($ch, "Connection", "Keep-Alive");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "qq =".$qq."&pwd=".$pwd."&FromWhere=register");
- $return = curl_exec($ch);
- curl_close($ch);
- echo strstr($return, "postfield") ? "Login failed" : "Login successful";
- ?>
Copy code
Notes:
1. Requires curl module support
2. After logging in, your friends will see that you are online
3. Don’t know how to log off.
|