|
|
|
ช่วยคิด regular expression ในการเช็ครูปแบบของ ip address ด้วยค่ะ |
|
|
|
|
|
|
|
Code (PHP)
$valid = filter_var($string, FILTER_VALIDATE_IP);
หรือ
Code (PHP)
$valid = preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/', $string);
|
|
|
|
|
Date :
2014-01-10 11:45:22 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
split "."
(int)
what about ip v6?
|
|
|
|
|
Date :
2014-01-12 21:05:39 |
By :
pjgunner.com |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|