array gethostbynamel ( string $hostname )
它用于获取按主机名给定的IPv4地址列表
Sr.No | 参数 & Description |
---|---|
1 |
hostname 它给出了相应的主机名 链接:https://www.learnfk.comhttps://www.learnfk.com/php/php-function-gethostbynamel.html 来源:LearnFk无涯教程网 |
如果无法解析主机名,它将返回IPv4地址数组或FALSE。
<?php $hosts=gethostbynamel('www.learnfk.com'); print_r($hosts); ?>
Above 示例 gives the result as follows
Array ( [0] => 117.18.237.42 )
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)