发布网友 发布时间:2022-04-20 11:51
共2个回答
热心网友 时间:2022-04-20 13:21
PHP与JS都可以写,PHP有本地库与API两种调用,JS可以调本地或远程地址。
// jQuery调用远程地址:默认本地IP:
http://ip.expand.ejcms.com/api.php
http://ip.expand.ejcms.com/api.php?format=json
http://ip.expand.ejcms.com/api.php?format=jsonp&callback=?
http://ip.expand.ejcms.com/api.php?format=js
http://ip.expand.ejcms.com/api.php?format=xml
查询IP地址:
http://ip.expand.ejcms.com/api.php?ip=216.58.199.238
http://ip.expand.ejcms.com/api.php?format=json&ip=216.58.199.238
http://ip.expand.ejcms.com/api.php?format=jsonp&ip=216.58.199.238&callback=?
http://ip.expand.ejcms.com/api.php?format=js&ip=216.58.199.238
http://ip.expand.ejcms.com/api.php?format=xml&ip=216.58.199.238
热心网友 时间:2022-04-20 14:39
两者都可以做 建议用php去获取 js需要用第三方api去读取(实质上还是后台获取)