search
HomeBackend DevelopmentPHP Tutorialphp 模拟GMAIL,HOTMAIL(MSN),YAHOO,163,126邮箱登录(原创)

最近一直在忙,赶在这个十一假期结束的时候,发表一下此文,为了是让这些源码开源出来

当然这些方法可能不可取,但大致应该是这种方向了吧,由于目前做的一个UCHOME港台的站点

咱们策划说要改一下好友邀请里面的显示方式,开始我也没有在意,当时就说行!

到了弄这个的时候才发现,UCH里面的这个地方是用漫游型式做的,让人很是无解,啥都改不了!

唉,既然都答应了说可以,现在实际情况不行了,所以觉得不好意思,为了快速解决这问题,在GOOGLE,

百度上搜了个遍,结果又出忽意料,就一个126邮箱的开源例子,其它的都没有,有一牛哥留着QQ说要其它的源码,

可以加QQ买!不对此人评论了!俺花了点时间,整了整,结果就幸运的弄出来了几个,因为时间有限,目前手上的项目一直在弄,所以就没有管其它的,现在给出 GMAIL,HOTMAIL(MSN),YAHOO的邮箱联系人的PHP源代码:

 

1.GMAIL

 <?phpdefine( "COOKIEJAR", tempnam( ini_get( "upload_tmp_dir" ), "cookie" ) );   //定义COOKIES存放的路径,要有操作的权限define( "TIMEOUT", 1000 ); //超时设定class GMAIL{        private function login($username, $password)        {                               //第一步:模拟抓取登录页面的数据,并记下cookies                $cookies = array();                $matches = array();                //获取表单                $login_url = "https://www.google.com/accounts/ServiceLoginAuth";                $ch = curl_init($login_url);                                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIEJAR);                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);                $contents = curl_exec($ch);                curl_close($ch);                //模拟参数                $name = array('dsh','timeStmp','secTok');                 foreach($name as $v) {                     preg_match('/<input\s*type="hidden"\s*name="'.$v.'"\s*id="'.$v.'"\s*value="(.*?)"\s*\/>/i', $contents, $matches);                    if(!empty($matches)) {                        $$v = $matches[1];                        $matches = array();                    }                        }                $server = 'mail';                preg_match('/<input\s*type="hidden"\s*name="GALX"\s*value="(.*?)"\s*\/>/i', $contents, $matches);                if(!empty($matches)) {                    $GALX = $matches[1];                    $matches = array();                }                 $timeStmp = time();                                //第二步: 开始登录                $ch = curl_init();                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                curl_setopt($ch, CURLOPT_URL, "https://www.google.com/accounts/ServiceLoginAuth");                curl_setopt($ch, CURLOPT_COOKIEFILE, COOKIEJAR);                 curl_setopt($ch, CURLOPT_POST, 1);                $fileds = "dsh=$dsh&Email=".$username."&Passwd={$password}&GALX=$GALX&timeStmp=$timeStmp&secTok=$secTok&signIn=Sign in&rmShown=1&asts=&PersistentCookie=yes";                 curl_setopt($ch, CURLOPT_POSTFIELDS, $fileds);                 curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIEJAR);                              curl_setopt($ch, CURLOPT_TIMEOUT, TIMEOUT);                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                $str = curl_exec($ch);                               curl_close($ch);                     //第三步:check Cookies即也算是个引导页面                $ch = curl_init("https://www.google.com/accounts/CheckCookie?chtml=LoginDoneHtml");                               curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                curl_setopt($ch,CURLOPT_COOKIEFILE,COOKIEJAR);                curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIEJAR);                                 curl_setopt($ch, CURLOPT_TIMEOUT, TIMEOUT);                     $str2 = curl_exec($ch);                                 curl_close($ch);                                                                if (strpos($contents, "安全退出") !== false)                {                                                return FALSE;                }                               return TURE;        }                //获取邮箱通讯录-地址        public function getAddressList($username, $password)        {                               if (!$this->login($username, $password))                {                        return FALSE;                }                //开始进入模拟抓取                $ch = curl_init();                curl_setopt($ch, CURLOPT_URL, "http://mail.google.com/mail/contacts/data/contacts?thumb=true&groups=true&show=ALL&enums=true&psort=Name&max=300&out=js&rf=&jsx=true");  //out=js返回json数据,不设置返回为xml数据                   curl_setopt($ch, CURLOPT_COOKIEFILE, COOKIEJAR);                /*  对于返回xml数据时需要此设置                curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/xml"));                $str = "<?xml version=\"1.0\"?><object><array name=\"items\"><object><string name=\"func\">pab:searchContacts</string><object name=\"var\"><array name=\"order\"><object><string name=\"field\">FN</string><boolean name=\"ignoreCase\">true</boolean></object></array></object></object><object><string name=\"func\">user:getSignatures</string></object><object><string name=\"func\">pab:getAllGroups</string></object></array></object>";                curl_setopt($ch, CURLOPT_POSTFIELDS, $str);                                */                curl_setopt($ch, CURLOPT_POST, 1);                                  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                curl_setopt($ch, CURLOPT_TIMEOUT, TIMEOUT);                $contents = curl_exec($ch);                curl_close($ch);                //die($contents);                //get mail list from the page information username && emailaddress                /* 对于返回xml数据时的处理                preg_match_all("/<string\s*name=\"EMAILREF\">(.*)<\/string>/Umsi",$contents,$mails);                preg_match_all("/<string\s*name=\"FN\">(.*)<\/string>/Umsi",$contents,$names);                $users = array();                foreach($names[1] as $k=>$user)                {                    //$user = iconv($user,'utf-8','gb2312');                    $users[$mails[1][$k]] = $user;                }                if (!$users)                {                    return '您的邮箱中尚未有联系人';                }                  */                 $contents = substr($contents, strlen('while (true); &&&START&&&'),  -strlen('&&&END&&& '));                 return $contents;        }}$gamil = new GMAIL;$res = $gamil->getAddressList('username@163.com','123456');echo $res;?><script type="text/javascript">var data = <?php echo $res; ?>alert(data['Body']); //json数据</script>



回复讨论(解决方案)

2.HOTMAIL(MSN)

<?phpdefine( "COOKIEJAR", tempnam( ini_get( "upload_tmp_dir" ), "cookie" ) );   //定义COOKIES存放的路径,要有操作的权限define( "TIMEOUT", 1000 ); //超时设定class MSN{        function getAddressList($username, $password)        {                               //第一步:模拟抓取登录页面的数据,并记下cookies                $cookies = array();                $ch = curl_init();                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                curl_setopt($ch, CURLOPT_URL, "http://login.live.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=".time()."&rver=6.0.5285.0&wp=MBI&wreply=http:%2F%2Fmail.live.com%2Fdefault.aspx&lc=2052&id=64855&mkt=en");                curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIEJAR);                curl_setopt($ch, CURLOPT_TIMEOUT, TIMEOUT);                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                $str = curl_exec($ch);                              curl_close($ch);                //参数的分析                $matches = array();                       preg_match('/<input\s*type="hidden"\s*name="PPFT"\s*id="(.*?)"\s*value="(.*?)"\s*\/>/i', $str, $matches);                 $PPFT = $matches[2];                                preg_match('/srf_sRBlob=\'(.*?)\';/i', $str, $matches);                 $PPSX = $matches[1];                                $type = 11;                                $LoginOptions = 3;                                $Newuser = 1;                                $idsbho = 1;                                $i2 = 1;                                $i12 = 1;                                $i3 = '562390';                                $PPSX = 'Pa';                //合并参数                $postfiles = "login=".$username."&passwd=".$password."&type=".$type."&LoginOptions=".$LoginOptions."&Newuser=".$Newuser."&idsbho=".$idsbho."&i2=".$i2."&i3=".$i3."&PPFT=".$PPFT."&PPSX=".$PPSX."&i12=1";                      //第二步:开始登录                $ch = curl_init();                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                 curl_setopt($ch, CURLOPT_COOKIEFILE, COOKIEJAR);                curl_setopt($ch, CURLOPT_URL, 'https://login.live.com/ppsecure/post.srf?wa=wsignin1.0&rpsnv=11&ct='.(time()+5).'&rver=6.0.5285.0&wp=MBI&wreply=http:%2F%2Fmail.live.com%2Fdefault.aspx&lc=2052&id=64855&mkt=en&bk='.(time()+715)); //此处的两个time()是为了模拟随机的时间                            curl_setopt($ch, CURLOPT_POST, 1);                curl_setopt($ch, CURLOPT_POSTFIELDS, $postfiles);                curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIEJAR);                //curl_setopt($ch, CURLOPT_HEADER, 1);                curl_setopt($ch, CURLOPT_TIMEOUT, TIMEOUT);                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                      $content = curl_exec($ch);                curl_close($ch);                 if( stripos($content,'WLWorkflow') !== FALSE ) {     //WLWorkflow登录页面JS                    return false;      //登录失败                }                //获取location链接                $matches = array();                       preg_match('/window.location.replace\(\"(.*?)\"\)/i', $content, $matches);                 $url_contiune_1 = $matches[1]; //接下来的链接                if(!$url_contiune_1) {                    return false;                }                //第三步: 进入引导页面                                $ch = curl_init();                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                curl_setopt($ch, CURLOPT_COOKIEFILE, COOKIEJAR);                curl_setopt($ch, CURLOPT_URL, $url_contiune_1);                curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIEJAR);                curl_setopt($ch, CURLOPT_HEADER, 1);                 curl_setopt($ch, CURLOPT_TIMEOUT, TIMEOUT);                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                $content_2 = curl_exec($ch);                                //echo $postfiles;                  curl_close($ch);                                //获取redicturl链接                $matches = array();                       preg_match('/<a\s*href=\"(.*?)\"\s*>/i', $content_2, $matches);                 $url_contiune_2 = $matches[1]; //接下来的链接                if(!$url_contiune_2) {                    return false;                }                                //跳过进入首页                /*                $ch = curl_init();                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                curl_setopt($ch, CURLOPT_COOKIEFILE, COOKIEJAR);                curl_setopt($ch, CURLOPT_URL, $url_contiune_2);                curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIEJAR);                curl_setopt($ch, CURLOPT_HEADER, 1);                 curl_setopt($ch, CURLOPT_TIMEOUT, 1000);                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                $content_3 = curl_exec($ch);                                 curl_close($ch);                */                //获取邮箱请求基址 读取host                $matches = array();                       preg_match('/(.*?)\/\/(.*?)\/(.*?)/i', $url_contiune_2, $matches);                 $url_contiune_3 = trim($matches[1]).'//'.trim($matches[2]); //首页定义的站点基址                $url_4 = $url_contiune_3.'/mail/ContactMainLight.aspx?n=435707983'; //n后面的数字是随机数                if(!$url_contiune_3) {                    return false;                }                                //第四步: 开始获取邮箱联系人                //base  $url_4                $ch = curl_init();                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                curl_setopt($ch, CURLOPT_COOKIEFILE, COOKIEJAR);                curl_setopt($ch, CURLOPT_URL, $url_4);                curl_setopt($ch, CURLOPT_TIMEOUT, TIMEOUT);                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                $str = curl_exec($ch);                //分析数据 (此处的数据因为hotmail的JS处理机制,所以在页面上看不出来,源码上可以看到数据)                return $this->hanlde_date($str);                        }        function hanlde_date($data) {                $new_str = array();                if(!empty($data)) {                        $ops_start = stripos($data,'ic_control_data');                        $ops_end = stripos($data,';',$ops_start);                        $new_str = substr($data, $ops_start + strlen('ic_control_data = '), $ops_end - $ops_start - strlen('ic_control_data = ') );                        return $new_str; //返回JSON对象                } else {                    return array();                }                                                            }}$msn = new MSN;$res = $msn->getAddressList('username@111.com','123456');echo $res;?><script type="text/javascript">var data = <?php echo $res; ?>alert(data['ic1'][6]);alert(data['ic1'][3]);</script> 

3.YAHOO

<?phpdefine( "COOKIEJAR", tempnam( ini_get( "upload_tmp_dir" ), "cookie" ) );   //定义COOKIES存放的路径,要有操作的权限define( "TIMEOUT", 1000 ); //超时设定class YAHOO{        private function login($username, $password)        {                               //第一步:模拟抓取登录页面的数据,并记下cookies                $cookies = array();                $matches = array();                                //获取表单                $login_url = "https://login.yahoo.com/config/login?.src=fpctx&.intl=us&.done=http%3A%2F%2Fwww.yahoo.com%2F";                $ch = curl_init($login_url);                                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIEJAR);                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);                $contents = curl_exec($ch);                curl_close($ch);                                //构造参数                $name = array('tries','src','md5','hash','js','last','promo','intl','bypass','partner','u','v','challenge','yplus','emailCode','pkg','stepid','ev','hasMsgr','chkP','done','pd','pad','aad');                 $postfiles = array();                $matches = array();                foreach($name as $v) {                     preg_match('/<input\s*type="hidden"\s*name=".'.$v.'"\s*value="(.*?)"\s*>/i', $contents, $matches);                    if(!empty($matches)) {                        $postfiles['.'.$v] = $matches[1];                        $matches = array();                     }                     if($v == 'pd') {                        $postfiles['.'.$v] = urlencode($postfiles['.'.$v]);                    }                       }                $postfiles['pad'] = 5;                 $postfiles['aad'] = 6;                $postfiles['login'] = urlencode($username);                $postfiles['passwd'] = $password;                $postfiles['.persistent'] = 'y';                 $postfiles['save'] = '';                 $postfiles['.done'] = urlencode($postfiles['.done']);                //$postfiles['.pd'] = urlencode($postfiles['.pd']);                 $postargs = '';                                foreach($postfiles as $k => $v){                    $postargs .= $k.'='.$v.'&';                        }                $postargs = substr($postargs,0,-1);                $request = "https://login.yahoo.com/config/login?";                                //开始登录                $ch = curl_init();                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                curl_setopt($ch, CURLOPT_URL, $request);                                  curl_setopt($ch, CURLOPT_POST, 1);                curl_setopt($ch, CURLOPT_POSTFIELDS, $postargs);                curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIEJAR);                curl_setopt($ch, CURLOPT_TIMEOUT, TIMEOUT);                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                $contents = curl_exec($ch);                curl_close($ch);                 if (stripos($contents,'submit') != FALSE)                {                                                return 0;                }                        return 1;        }                //获取邮箱通讯录-地址        public function getAddressList($username, $password)        {                               if (!$this->login($username, $password))                {                        return 0;                }                        //开始进入模拟抓取            //get mail list from the page information username && emailaddress            $url = "http://address.mail.yahoo.com/";            $data = array( );            if ( !$data = $this->hanlde_date( $url, $names, $emails) )            {                return FALSE;            }            echo '<pre class="brush:php;toolbar:false">';            print_r($data);            return $data;        }        function hanlde_date( $url, &$names, &$emails)        {            $ch = curl_init( );            curl_setopt( $ch, CURLOPT_COOKIEFILE, COOKIEJAR );            curl_setopt( $ch, CURLOPT_URL, $url );            curl_setopt( $ch, CURLOPT_TIMEOUT, TIMEOUT );            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);            $contents = curl_exec($ch);            curl_close($ch);             $temparr = array();            preg_match_all('/InitialContacts\s*=\s*(.*?);/i',$contents,$temparr);            return $temparr[1][0].';';       //匹配出JSON对象数组        }}$yahoo = new YAHOO;$res = $yahoo->getAddressList('username@yahoo.com.cn','123456');?><script type="text/javascript">var data = <?php echo $res; ?>var obj1 = data[0];alert(data[0]['contactName']);</script>

 

 

注:

163,126在网上的源码都有,在此就不一一的列出来了哦

当然此代码是自己个人的拙作,只是为了给大家此类问题做一个指引

没有对这个感兴趣的

学习了,收藏了。感谢楼主分享

楼主对模拟登录听熟悉啊

有用,
收藏

有用··收藏  多谢

msn的获取结果再处理一下就好了,结果比较凌乱

收藏了,蟹蟹

主要是 Curl 和 正则。

不错。

楼主还在不在?我正想要这些,测试了一晚,gmail和msn都可以,就是yahoo返回的数据不知道怎么处理,
yahoo返回的格式是这样的[{"guid":"","contactId":"1",...}{...}{...}]
我要转成php数组,但当成json数据转数组也不行,请问怎么处理yahoo这个数据?谁知道?

楼主还在不在?我正想要这些,测试了一晚,gmail和msn都可以,就是yahoo返回的数据不知道怎么处理,
yahoo返回的格式是这样的[{"guid":"","contactId":"1",...}{...}{...}]
我要转成php数组,但当成json数据转数组也不行,请问怎么处理yahoo这个数据?谁知道?
这三个返回来的都是json数据,也是比较好处理的啊,它就是一个json数组用数组的形式访问就行了

还以为对大家没有啥用,过两天把JSON结果处理一下,在贴上来

没有对这个感兴趣的

当然


















有!

感谢LZ分享

收藏。谢谢楼主。

引用 11 楼 billssjone 的回复:
楼主还在不在?我正想要这些,测试了一晚,gmail和msn都可以,就是yahoo返回的数据不知道怎么处理,
yahoo返回的格式是这样的[{"guid":"","contactId":"1",...}{...}{...}]
我要转成php数组,但当成json数据转数组也不行,请问怎么处理yahoo这个数据?谁知道?

这三个返回来的都是js……
?什?我用 php的foreach取???出??有[]??好象不能用json?理,php怎??理?

dingdingdingdingdingdingding

啊速度撒的撒旦爱的爱上爱上

按时大速度撒的撒的撒的撒的撒旦

谢谢  高手!
学到了

学习了,谢谢~~~

楼主真是有心人,谢谢分享!

有用,
收藏

楼主真是有心人,谢谢分享!

楼主帮我看看php怎么处理yahoo返回的数据,
===============
$yahoo = new YAHOO;
$email_json = $yahoo->getAddressList($email, $password);
foreach($email_json as $key => $value){


===============
$email_json正常返回两个我的yahoo好友,格式为[{"guid":"","contactId":"1",...},{...}]
但是我在用foreach读取时出错:Warning: Invalid argument supplied for foreach() in 
我用json_decode($email_json, true)转数组再用foreach读也是出同样的错,请问我到底怎么处理返回的数据?试了一晚都没解决。

好东西啊 

不错,收藏。

我改用js来读取yahoo的返回数据了,
请问楼主有QQ找好友的吗?我想再要一个QQ的

好东西 收藏了  感谢分享

msn的获取结果再处理一下就好了,结果比较凌乱

我分享一下我处理获取结果的代码:
$msn = new MSN;
$email_json = $msn->getAddressList($email, $password);
$email_arr = json_decode($email_json, true);
foreach($email_arr as $key => $value){
  if(count($value)==19){
    echo "

名字:".$value[3]."/邮箱:".$value[6]."

";
  }
}
==========================
$gamil = new GMAIL;
$email_json = $gamil->getAddressList($email, $password);
$email_arr = json_decode($email_json, true);
$email2_arr=$email_arr['Body'];
foreach($email2_arr['Contacts'] as $key => $value){
  echo "

名字:".$value['DisplayName']."/邮箱:".$value['Emails'][0]['Address']."

";
}
=================
yahoo的:
$yahoo = new YAHOO;
$email_json = $yahoo->getAddressList($email, $password);
?>
<script> <br /> var data = <?php echo $email_json; ?> <br /> for(var i=0;i<data.length;i++){ <br /> alert("名字:"+data[i]['contactName']+"/邮箱:"+data[i]['email']); <br /> } <br /> </script>

thanks

so good

hen qiang大

感谢楼主分享!先试用一下!

感谢楼主分享!先试用一下!

感谢楼主分享!先试用一下!

收藏一下,以后应该是有用,感谢楼主分享

感谢分享···

不错不错

163之类的邮箱有源码吗?谁给贴出来

感谢分享

牛人,就是牛人啊

Statement
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
How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

How does PHP handle object cloning (clone keyword) and the __clone magic method?How does PHP handle object cloning (clone keyword) and the __clone magic method?Apr 17, 2025 am 12:24 AM

In PHP, use the clone keyword to create a copy of the object and customize the cloning behavior through the \_\_clone magic method. 1. Use the clone keyword to make a shallow copy, cloning the object's properties but not the object's properties. 2. The \_\_clone method can deeply copy nested objects to avoid shallow copying problems. 3. Pay attention to avoid circular references and performance problems in cloning, and optimize cloning operations to improve efficiency.

PHP vs. Python: Use Cases and ApplicationsPHP vs. Python: Use Cases and ApplicationsApr 17, 2025 am 12:23 AM

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

Describe different HTTP caching headers (e.g., Cache-Control, ETag, Last-Modified).Describe different HTTP caching headers (e.g., Cache-Control, ETag, Last-Modified).Apr 17, 2025 am 12:22 AM

Key players in HTTP cache headers include Cache-Control, ETag, and Last-Modified. 1.Cache-Control is used to control caching policies. Example: Cache-Control:max-age=3600,public. 2. ETag verifies resource changes through unique identifiers, example: ETag: "686897696a7c876b7e". 3.Last-Modified indicates the resource's last modification time, example: Last-Modified:Wed,21Oct201507:28:00GMT.

Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1?Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1?Apr 17, 2025 am 12:06 AM

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values ​​to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP: An Introduction to the Server-Side Scripting LanguagePHP: An Introduction to the Server-Side Scripting LanguageApr 16, 2025 am 12:18 AM

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP and the Web: Exploring its Long-Term ImpactPHP and the Web: Exploring its Long-Term ImpactApr 16, 2025 am 12:17 AM

PHP has shaped the network over the past few decades and will continue to play an important role in web development. 1) PHP originated in 1994 and has become the first choice for developers due to its ease of use and seamless integration with MySQL. 2) Its core functions include generating dynamic content and integrating with the database, allowing the website to be updated in real time and displayed in personalized manner. 3) The wide application and ecosystem of PHP have driven its long-term impact, but it also faces version updates and security challenges. 4) Performance improvements in recent years, such as the release of PHP7, enable it to compete with modern languages. 5) In the future, PHP needs to deal with new challenges such as containerization and microservices, but its flexibility and active community make it adaptable.

Why Use PHP? Advantages and Benefits ExplainedWhy Use PHP? Advantages and Benefits ExplainedApr 16, 2025 am 12:16 AM

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool