PHP code for automatic registration of login verification mechanism
Release: 2016-07-25 09:05:24
Original
1464 people have browsed it
-
- $urls = parse_url($db_bbsurl);
- $domain = $urls['host'];
- include_once (R_P .'require/admvclient.php');
- $adm_oem= new Cnzz_Adm_Oem();
- //Determine whether the user password exists in the config file
- pwCache::getData(D_P . "data/bbscache/adm_config.php");//Username and password configuration file
- if (isset($adm_user) && isset ($adm_pwd)) {
- $request = array("adm_user"=>$adm_user,"adm_pwd"=>$adm_pwd,'cms'=>'pw');
- $token = $adm_oem-> get_appkey_once($request);
- if ($token<0){
- if($token==-1){
- adminmsg('The passed parameter is empty or the passed parameter is not a number');
- }else if($token= =-2){
- adminmsg('Error passing parameter password');
- }
- }else{
- $apikey = $token['adm_key'];
- }
- }else{
- $Key = md5($domain.' KclGiq7H');
- $request = array('cms'=>'pw','domain'=>$domain,'key'=>$Key);
- $token = $adm_oem->reg_user_once( $request);
- if ($token<0){//Exception
- if($token==-1){
- adminmsg('key is wrong');
- } else if($token==-2){
- adminmsg('The domain name length is incorrect (1~64)');
- } elseif($token==-3){
- adminmsg('The domain name input is incorrect (such as entering Chinese characters)');
- } elseif($token ==-4){
- adminmsg('The domain name is incorrectly inserted into the database');
- } elseif($token==-5){
- adminmsg('The page called by the IP user exceeds the threshold, and the threshold is tentatively set to 10') ;
- }
- } elseif (is_array($token) && isset($token)){
- $adm_user = $token['adm_user'];
- $adm_pwd = $token['adm_pwd'];
- $apikey = $token ['adm_key'];
- pwCache::setData(D_P.'data/bbscache/adm_config.php',"");
- }
- }
- ?>
Copy code
|
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31