已掉线,重新登录

首页 > 绿虎论坛 > 历史版块 > 编程 > PHP > 源码

标题: PHP 检测 IP存活+端口检测

作者: @Ta

时间: 2020-01-29

点击: 2164


ICMP.php(5.17 KB)


这里使用 非 exec/system 调用命令去ping,那个不行。

注意检测端口开启,需要先对IP检测存活,否则 阻塞20秒。

//这里换成你的ICMP.php 的路径
require_once '../../../Applications/JsonRpc/Services/ICMP.php';

$a=ICMP::run('127.0.0.1');
print_r($a);
$b=ICMP::run('www.baidu.com');
print_r($b);
$c=ICMP::port('127.0.0.1','20');

print_r($c);
return;




79e888d57440b7f2a308dddf820bc5bb74310.png

[隐藏样式|查看源码]


『回复列表(0|隐藏机器人聊天)』

帖子没有回复
回复需要登录

8月25日 06:03 星期一

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1