| Conditions | 4 |
| Paths | 4 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 72 | protected static function urlValidateHost($host) |
||
| 73 | { |
||
| 74 | return ( |
||
| 75 | mb_ereg_match('^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$', $host) && //valid chars check |
||
| 76 | mb_ereg_match('^.{1,253}$', $host) && //overall length check |
||
| 77 | mb_ereg_match('^[^\.]{1,63}(\.[^\.]{1,63})*$', $host) && //length of each label |
||
| 78 | !filter_var($host, FILTER_VALIDATE_IP) //is not an IP address |
||
| 79 | ); |
||
| 80 | } |
||
| 81 | |||
| 99 |