搜尋
  • 登入
  • 報名
密碼重置成功

關注您感興趣的項目並了解有關它們的最新消息

首頁 PHP 函式庫 其它類別庫 身分證驗證PHP類
身分證驗證PHP類
class IdcardAction extends Action{
  function get_xingzuo($cid) { 
    if (!$this->isIdCard($cid)) return '';
    $bir = substr($cid,10,4);
    $month = (int)substr($bir,0,2);
    $day = (int)substr($bir,2);
    $strValue = '';
    if (($month == 1 && $day >= 20) || ($month == 2 && $day <= 18)) {
      $strValue = "水瓶座";
    } else if (($month == 2 && $day >= 19) || ($month == 3 && $day <= 20)) {
      $strValue = "双鱼座";
    } else if (($month == 3 && $day > 20) || ($month == 4 && $day <= 19)) {
      $strValue = "白羊座";
    } else if (($month == 4 && $day >= 20) || ($month == 5 && $day <= 20)) {
      $strValue = "金牛座";
    } else if (($month == 5 && $day >= 21) || ($month == 6 && $day <= 21)) {
      $strValue = "双子座";
    } else if (($month == 6 && $day > 21) || ($month == 7 && $day <= 22)) {
      $strValue = "巨蟹座";
    } else if (($month == 7 && $day > 22) || ($month == 8 && $day <= 22)) {
      $strValue = "狮子座";
    } else if (($month == 8 && $day >= 23) || ($month == 9 && $day <= 22)) {
      $strValue = "处女座";
    } else if (($month == 9 && $day >= 23) || ($month == 10 && $day <= 23)) {
      $strValue = "天秤座";
    } else if (($month == 10 && $day > 23) || ($month == 11 && $day <= 22)) {
      $strValue = "天蝎座";
    } else if (($month == 11 && $day > 22) || ($month == 12 && $day <= 21)) {
      $strValue = "射手座";
    } else if (($month == 12 && $day > 21) || ($month == 1 && $day <= 19)) {
      $strValue = "魔羯座";
    }
    return $strValue;
  }

 PHP根據身分證號,自動取得對應的星座函數,然後自動返回對應的星座,自動返回性別,判斷是否成年

免責聲明

本站所有資源皆由網友貢獻或各大下載網站轉載。請自行檢查軟體的完整性!本站所有資源僅供學習參考。請不要將它們用於商業目的。否則,一切後果都由您負責!如有侵權,請聯絡我們刪除。聯絡方式:[email protected]

如何為 PHP API 實現 JWT 身份驗證 如何為 PHP API 實現 JWT 身份驗證

20 Dec 2025

答案:使用firebase/php-jwt庫實現PHP的JWT認證,登錄時生成包含用戶信息的加密token,通過Authorization頭傳輸,並在受保護路由中驗證其有效性,確保無狀態安全通信。

如何用PHP實現基本身份驗證? 如何用PHP實現基本身份驗證?

21 Nov 2025

答案:HTTP基本認證通過驗證$_SERVER['PHP_AUTH_USER']和$_SERVER['PHP_AUTH_PW']實現,需配置WWW-Authenticate頭返回401狀態碼以觸發瀏覽器登錄提示,憑證為Base64編碼,必須使用HTTPS保障安全,避免硬編碼憑據並建議結合日誌與更安全的認證機制。

如何在 PHP API 中實現 JWT 身份驗證? 如何在 PHP API 中實現 JWT 身份驗證?

19 Jan 2026

使用 firebase/php-jwt — 它是事實上的標準,積極維護,正確處理時鐘偏差算法驗證,需要 PHP7.4 和 ext-openssl,並強制執行安全密鑰生成和嚴格驗證。

騰訊會議怎麼設定入會驗證_騰訊會議參加身分驗證教學【實用】 騰訊會議怎麼設定入會驗證_騰訊會議參加身分驗證教學【實用】

11 Apr 2026

騰訊會議身分驗證需主持人設定或與會者綁定手機號碼/微信:主持人在行程中啟用「入會前需驗證身分」並選驗證方式;與會者透過個人中心綁定手機號碼或微信;企業管理員可在後台統一配置企業身分策略。

身分認證審核失敗了怎麼辦?火幣HTX驗證問題解決方案 身分認證審核失敗了怎麼辦?火幣HTX驗證問題解決方案

20 Mar 2026

火幣HTX身分認證審核失敗需按五步驟排查:一查證件拍攝品質與完整性;二核對填寫資訊與證件一致性;三更換未綁定的手機號碼;四切換設備與網路環境重試;五聯絡人工審核並提交補充資料。

如何在 PHP 中實現 JWT(JSON Web Token)身份驗證 如何在 PHP 中實現 JWT(JSON Web Token)身份驗證

10 Nov 2025

答案:使用FirebaseJWT庫在PHP中實現JWT認證需先安裝庫,登錄時生成含用戶信息和過期時間的令牌,保護路由時從Authorization頭提取並驗證令牌,確保安全最佳實踐。

顯示更多