Browse Source

update readme

main
yggverse 9 months ago
parent
commit
18ec72362e
  1. 26
      README.md

26
README.md

@ -70,6 +70,8 @@ var_dump(
### Resolve ### Resolve
#### Init resolver
``` ```
$resolve = new \Yggverse\Net\Resolve( $resolve = new \Yggverse\Net\Resolve(
[ [
@ -82,9 +84,31 @@ $resolve = new \Yggverse\Net\Resolve(
], ],
// .. // ..
); );
```
$resolved = $resolve->address( #### Get resolved URL string
```
$resolved = $resolve->url(
'https://en.wikipedia.org/wiki/Domain_Name_System' 'https://en.wikipedia.org/wiki/Domain_Name_System'
// next arguments contain debug variables and new address object
);
if ($resolved)
{
var_dump(
$resolved // https://185.15.59.224/wiki/Domain_Name_System
);
}
```
#### Resolve Address object
```
$resolved = $resolve->address(
new \Yggverse\Net\Address(
'https://en.wikipedia.org/wiki/Domain_Name_System'
)
); );
if ($resolved) if ($resolved)

Loading…
Cancel
Save