长网址转换为短网址
2016-07-29 16:26
274 查看
50r.me 转换
https://50r.me/users/stats
新浪短网址接口的稳定性和跳转速度还是很给力的,现给出其API说明。
http://open.weibo.com/wiki/Short_url/shorten
该接口支持两种返回格式:xml和json
对应的URL请求地址为:
xml:http://api.t.sina.com.cn/short_url/shorten.xml
json:http://api.t.sina.com.cn/short_url/shorten.json
请求方式:GET
请求参数:
source:应用的appkey
url_long:需要转换的长链接
举个例子:
xml:http://api.t.sina.com.cn/short_url/shorten.xml?source=3271760578&url_long=http://www.douban.com/note/249723561/
返回内容为:
<urls>
<url>
<url_short>http://t.cn/zWXySpZ</url_short>
<url_long>http://www.douban.com/note/249723561/</url_long>
<type>0</type>
</url>
</urls>
json:http://api.t.sina.com.cn/short_url/shorten.json?source=3271760578&url_long=http://www.douban.com/note/249723561/
返回内容为:
[{"url_short":"http://t.cn/zWXySpZ","url_long":http://www.douban.com/note/249723561/","type":0}]
https://50r.me/users/stats
新浪短网址接口的稳定性和跳转速度还是很给力的,现给出其API说明。
http://open.weibo.com/wiki/Short_url/shorten
该接口支持两种返回格式:xml和json
对应的URL请求地址为:
xml:http://api.t.sina.com.cn/short_url/shorten.xml
json:http://api.t.sina.com.cn/short_url/shorten.json
请求方式:GET
请求参数:
source:应用的appkey
url_long:需要转换的长链接
举个例子:
xml:http://api.t.sina.com.cn/short_url/shorten.xml?source=3271760578&url_long=http://www.douban.com/note/249723561/
返回内容为:
<urls>
<url>
<url_short>http://t.cn/zWXySpZ</url_short>
<url_long>http://www.douban.com/note/249723561/</url_long>
<type>0</type>
</url>
</urls>
json:http://api.t.sina.com.cn/short_url/shorten.json?source=3271760578&url_long=http://www.douban.com/note/249723561/
返回内容为:
[{"url_short":"http://t.cn/zWXySpZ","url_long":http://www.douban.com/note/249723561/","type":0}]
相关文章推荐
- php简单实现短网址(短链)还原的方法(测试可用)
- php短网址和数字之间相互转换的方法
- php实现的短网址算法分享
- PHP生成短网址的3种方法代码实例
- php生成短网址示例
- PHP生成短网址方法汇总
- 两种JAVA实现短网址服务算法
- Python实现短网址ShortUrl的Hash运算实例讲解
- python3实现短网址和数字相互转换的方法
- php简单实现短网址(短链)还原的方法(测试可用)
- 生成短网址
- dwz.cn接口java客户端实现
- JQuery与Ajax调用新浪API获取短网址
- 百度短网址服务
- 通过抓包分析短网址技术的实现方式
- 震惊了:调用渣浪短网址服务(旧)生成短网址,小心掉坑
- 短网址服务开发关键问题与解决方案
- 关于短网址的运营:如何处理庞大的短网址数据库
- FT12短网址改版说明:一次被迫的改版
- 短网址在短信移动营销中的应用--移动营销利器