Home > Backend Development > PHP Tutorial > 如何用php获取指定网站的ip,比如获取baidu.com的ip呢?

如何用php获取指定网站的ip,比如获取baidu.com的ip呢?

WBOY
Release: 2016-06-06 20:29:12
Original
1345 people have browsed it

这个使用php本身可以实现吗?

回复内容:

这个使用php本身可以实现吗?

echo gethostbyname ( 'www.baidu.com' );//180.97.33.108

用php执行系统自带的解析域名的命令

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template