--TEST--
ares
--SKIPIF--
-<?php if (!extension_loaded("ares")) print "skip"; ?>
+<?php if (!extension_loaded("ares") || getenv("SKIP_ONLINE_TESTS")) print "skip"; ?>
--FILE--
<?php
echo "-TEST\n";
$a = ares_init();
-ares_gethostbyname($a, "cb", "php.net");
-ares_gethostbyaddr($a, "cb", "66.163.161.117");
-ares_getnameinfo($a, "cb", ARES_NI_TCP, "66.163.161.117");
+ares_gethostbyname($a, "cb", "a.resolvers.Level3.net");
+ares_gethostbyaddr($a, "cb", "4.2.2.2");
+ares_getnameinfo($a, "cb", ARES_NI_TCP, "4.2.2.3");
ares_process_all($a);
ares_destroy($a);
[1] => 0
[2] => stdClass Object
(
- [name] => php.net
+ [name] => a.resolvers.Level3.net
[aliases] => Array
(
)
[addrtype] => 2
[addrlist] => Array
(
- [0] => 66.163.161.117
+ [0] => 4.2.2.1
)
)
[1] => 0
[2] => stdClass Object
(
- [name] => y2.php.net
+ [name] => b.resolvers.Level3.net
[aliases] => Array
(
+ [0] => b.resolvers.Level3.net
)
[addrtype] => 2
[addrlist] => Array
(
- [0] => 66.163.161.117
+ [0] => 4.2.2.2
)
)
(
[0] => Resource id #%d
[1] => 0
- [2] => y2.php.net
+ [2] => c.resolvers.level3.net
[3] =>
)
Done
--TEST--
ares
--SKIPIF--
-<?php if (!extension_loaded("ares")) print "skip"; ?>
+<?php if (!extension_loaded("ares") || getenv("SKIP_ONLINE_TESTS")) print "skip"; ?>
--FILE--
<?php
echo "-TEST\n";
$a = ares_init();
$q = array();
-foreach (array("at", "de", "uk", "us", "ch", "ru") as $tld) {
+foreach (array("at", "de", "uk") as $tld) {
$q[] = ares_gethostbyname($a, null, "$tld.php.net");
}
%sTEST
stdClass Object
(
- [name] => gd.tuwien.ac.at
+ [name] => %s
[aliases] => Array
(
- [0] => at.php.net
)
[addrtype] => 2
[addrlist] => Array
(
- [0] => 192.35.244.50
+ %a
)
)
stdClass Object
(
- [name] => php3.globe.de
+ [name] => %s
[aliases] => Array
(
- [0] => de.php.net
)
[addrtype] => 2
[addrlist] => Array
(
- [0] => 212.124.37.9
+ %a
)
)
stdClass Object
(
- [name] => php.networkedsystems.co.uk
+ [name] => %s
[aliases] => Array
(
- [0] => uk.php.net
)
[addrtype] => 2
[addrlist] => Array
(
- [0] => 85.116.4.7
- )
-
-)
-stdClass Object
-(
- [name] => ch.php.net
- [aliases] => Array
- (
- )
-
- [addrtype] => 2
- [addrlist] => Array
- (
- [0] => 128.178.77.24
- )
-
-)
-stdClass Object
-(
- [name] => php.directnet.ru
- [aliases] => Array
- (
- [0] => ru.php.net
- )
-
- [addrtype] => 2
- [addrlist] => Array
- (
- [0] => 195.222.164.18
+ %a
)
)
--TEST--
ares
--SKIPIF--
-<?php if (!extension_loaded("ares")) print "skip"; ?>
+<?php if (!extension_loaded("ares") || getenv("SKIP_ONLINE_TESTS")) print "skip"; ?>
--FILE--
<?php
echo "-TEST\n";
$a = ares_init();
$q = array();
-foreach (array("at", "de", "uk", "us", "ch", "ru") as $tld) {
+foreach (array("at", "de", "uk", "us", "ch") as $tld) {
$q[] = ares_gethostbyname($a, null, "$tld.php.net");
}
[gethostbyaddr] =>
[getnameinfo] =>
)
-stdClass Object
-(
- [type] => 3
- [search] =>
- [query] =>
- [send] =>
- [gethostbyname] => stdClass Object
- (
- [name] => ru.php.net
- [family] => 2
- )
-
- [gethostbyaddr] =>
- [getnameinfo] =>
-)
Done