diff options
Diffstat (limited to 'assets/php/vendor/react/dns/examples/02-concurrent.php')
-rwxr-xr-x | assets/php/vendor/react/dns/examples/02-concurrent.php | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/assets/php/vendor/react/dns/examples/02-concurrent.php b/assets/php/vendor/react/dns/examples/02-concurrent.php deleted file mode 100755 index 87e3f5c..0000000 --- a/assets/php/vendor/react/dns/examples/02-concurrent.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -use React\Dns\Config\Config; -use React\Dns\Resolver\Factory; - -require __DIR__ . '/../vendor/autoload.php'; - -$loop = React\EventLoop\Factory::create(); - -$config = Config::loadSystemConfigBlocking(); -$server = $config->nameservers ? reset($config->nameservers) : '8.8.8.8'; - -$factory = new Factory(); -$resolver = $factory->create($server, $loop); - -$names = array_slice($argv, 1); -if (!$names) { - $names = array('google.com', 'www.google.com', 'gmail.com'); -} - -foreach ($names as $name) { - $resolver->resolve($name)->then(function ($ip) use ($name) { - echo 'IP for ' . $name . ': ' . $ip . PHP_EOL; - }, 'printf'); -} - -$loop->run(); |