| 1234567891011121314151617181920212223242526272829 |
- <?php
- namespace App\dao\SendCode;
- use App\Facade\TableName;
- use Illuminate\Support\Facades\DB;
- use Illuminate\Support\Facades\Log;
- class WebRegister
- {
- public function ipLimit($ip)
- {
- // 查找IP是否注册过
- $ipRegisterCount = DB::table(TableName::QPAccountsDB() . 'AccountsInfo')
- ->where('RegisterIP', $ip)
- ->select('UserID')
- ->count();
- Log::info('网页注册IP_' . $ip . ' _注册数量_ ' . $ipRegisterCount);
- if ($ipRegisterCount > 2) {
- return false;
- }
- return true;
- }
- }
|