简体   繁体   English

如何检查IP地址有效还是无效? 用PHP

[英]How to check if an IP address is active or dead ? with php

How to check if an IP address is active or dead ? 如何检查IP地址有效还是无效? with php 用PHP

Is this an IP address on a network, or a server IP address? 这是网络上的IP地址还是服务器IP地址? You could use PHP's exec command; 您可以使用PHP的exec命令;

$output = exec('ping 127.0.0.1');

output will equal the executed command output; 输出将等于执行的命令输出;

Try Free software"Advanced IP Scanner".It's really helpful for this purpose. 尝试使用免费软件“高级IP扫描仪”。对于此目的,它确实很有帮助。

Naseem 纳西姆

您可以使用Net_ping Pear的软件包来实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM