请注意,本文编写于 300 天前,最后修改于 284 天前,其中某些信息可能已经过时。
请求地址:
示例:
参数:
名称 | 必填 | 说明 |
---|---|---|
code | 否 | 调用js,xml |
js | 是 | 返回js |
json | 是 | 返回json |
xml | 是 | 返回xml |
Array | 是 | 返回arr |
访问示例:
- http://api.hjn.xyz/wy/shehui.php?code=array
- http://api.hjn.xyz/wy/shehui.php?code=json
- http://api.hjn.xyz/wy/shehui.php?code=xml
- http://api.hjn.xyz/wy/shehui.php?code=js
- http://api.hjn.xyz/wy/shehui.php
返回示例JSON:
{"code":200,"msg":"XXXXX"}
调用js示例:
<script src="https://api.hjn.xyz/wy/shehui.php?code=javascript" type="text/javascript"></script>
<script>shehui()</script>
其他:
当接口没有添加code时则随机返回一行
当接口添加array时则返回array(2) { ["code"]=> int(200) ["msg"]=> string(66) "XXXX" }
格式array
=> Array
=> arr
=> Arr
当接口添加json时则返回 {"code":200,"msg":"XXX"}
JSON
=> json
当接口添加xml时则随机返回xml格式xml
=> XML
当接口添加js时则返回function shehui(){document.write("XXX");}
js
=> javascript
=> JavaScript