add gethostbyname example

This commit is contained in:
Shuhei Tanuma 2012-06-04 00:11:45 +09:00
parent a3a1cc887c
commit 4bb3eea336

View File

@ -0,0 +1,14 @@
<?php
$uv = uv_ares_init_options(uv_default_loop(), array(
"servers" => array(
"8.8.8.8"
),
"port"=>53
),null);
ares_gethostbyname($uv,"google.com",AF_INET, function($name, $addr){
var_dump($name);
var_dump($addr);
});
uv_run();