php 根据ip获取地区的方法
php 根据ip获取地区的方法
<?php $ip=$_GET['ip']; header("Content-type:text/html;charset=utf-8"); require('phpQuery/phpQuery.php'); $info=file_get_contents("https://ipchaxun.com/".$ip."/"); $eg2=phpQuery::newDocument($info); print_r(pq('.value:eq(1)')->html());
如果遇到什么不懂的地方直接关注公众号留言(本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。)
作者:newmiracle
出处:https://www.cnblogs.com/newmiracle/