@@ -44,11 +44,11 @@ |
||
| 44 | 44 | public function getIp(string $url) |
| 45 | 45 | { |
| 46 | 46 | $domain = parse_url($url); |
| 47 | - if (empty($domain['host'])) { |
|
| 47 | + if (empty($domain[ 'host' ])) { |
|
| 48 | 48 | return; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - $ip = gethostbyname($domain['host']); |
|
| 51 | + $ip = gethostbyname($domain[ 'host' ]); |
|
| 52 | 52 | |
| 53 | 53 | return filter_var($ip, FILTER_VALIDATE_IP) ? $ip : null; |
| 54 | 54 | } |