We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cad62c commit 88d1f72Copy full SHA for 88d1f72
check_mobile.php
@@ -0,0 +1,17 @@
1
+<?php
2
+define('SMS_MOBILE_PATTERN', '/^1[3458]\d{9}$/'); //检测手机号正则
3
+$file = file('huiyuan.txt');
4
+$new = fopen('new.txt', "ab");
5
+$no = fopen('no.txt', "ab");
6
+foreach ($file as $mobile) {
7
+ $mobile = trim($mobile);
8
+ if (empty($mobile)) continue;
9
+ //if (!preg_match(SMS_MOBILE_PATTERN , $mobile)) continue;
10
+ if (!preg_match(SMS_MOBILE_PATTERN , $mobile)){
11
+ fwrite($no, $mobile . "\r\n");
12
+ continue;
13
+ }
14
+ fwrite($new, $mobile . "\r\n");
15
+}
16
+fclose($new);
17
+fclose($no);
0 commit comments