mirror of
https://github.com/YGGverse/net-php.git
synced 2026-03-31 17:15:35 +00:00
implement resolve feature
This commit is contained in:
parent
1e5b42d407
commit
96cd4163be
2 changed files with 216 additions and 0 deletions
31
README.md
31
README.md
|
|
@ -68,6 +68,37 @@ var_dump(
|
|||
);
|
||||
```
|
||||
|
||||
### Resolve
|
||||
|
||||
```
|
||||
$resolve = new \Yggverse\Net\Resolve(
|
||||
[
|
||||
'A',
|
||||
'AAAA'
|
||||
],
|
||||
[
|
||||
'1.1.1.1',
|
||||
'8.8.8.8'
|
||||
],
|
||||
// ..
|
||||
);
|
||||
|
||||
$resolved = $resolve->address(
|
||||
'https://en.wikipedia.org/wiki/Domain_Name_System'
|
||||
);
|
||||
|
||||
if ($resolved)
|
||||
{
|
||||
var_dump(
|
||||
$resolved->get() // https://185.15.59.224/wiki/Domain_Name_System
|
||||
);
|
||||
|
||||
var_dump(
|
||||
$resolved->getHost() // 185.15.59.224
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
### Address
|
||||
|
||||
Includes methods to work with network addresses.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue