WebRegister.php 592 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\dao\SendCode;
  3. use App\Facade\TableName;
  4. use Illuminate\Support\Facades\DB;
  5. use Illuminate\Support\Facades\Log;
  6. class WebRegister
  7. {
  8. public function ipLimit($ip)
  9. {
  10. // 查找IP是否注册过
  11. $ipRegisterCount = DB::table(TableName::QPAccountsDB() . 'AccountsInfo')
  12. ->where('RegisterIP', $ip)
  13. ->select('UserID')
  14. ->count();
  15. Log::info('网页注册IP_' . $ip . ' _注册数量_ ' . $ipRegisterCount);
  16. if ($ipRegisterCount > 2) {
  17. return false;
  18. }
  19. return true;
  20. }
  21. }