免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2905 | 回复: 5
打印 上一主题 下一主题

[网络相关] 求CDN刷新shell [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-11-28 13:44 |只看该作者 |倒序浏览
本帖最后由 Debentoo_Gao 于 2012-11-28 13:47 编辑

ChinaCache的刷新API:
  1. http://ccms.chinacache.com/index.jsp?user=username&pswd=password&ok=ok&urls=http://www.chinacache.com/index.html%0D%0Ahttp://http://www.chinacache.com/index.swf&dirs=http://www.chinacache.com/a/%0D%0Ahttp://www.chinacache.com/b/
复制代码
其中0D%0A为几个url或dir中间的链接符

要求:
输入shell名 dir或者url名

可以直接刷新CDN

论坛徽章:
8
摩羯座
日期:2014-11-26 18:59:452015亚冠之浦和红钻
日期:2015-06-23 19:10:532015亚冠之西悉尼流浪者
日期:2015-08-21 08:40:5815-16赛季CBA联赛之山东
日期:2016-01-31 18:25:0515-16赛季CBA联赛之四川
日期:2016-02-16 16:08:30程序设计版块每日发帖之星
日期:2016-06-29 06:20:002017金鸡报晓
日期:2017-01-10 15:19:5615-16赛季CBA联赛之佛山
日期:2017-02-27 20:41:19
2 [报告]
发表于 2012-11-28 14:50 |只看该作者
是要传说中的urlencode还是什么?

论坛徽章:
0
3 [报告]
发表于 2012-11-28 15:10 |只看该作者
waker 发表于 2012-11-28 14:50
是要传说中的urlencode还是什么?

就是直接能用shell强制刷新chinacache的cdn,不需要登录chinacache的后台刷新了,谢谢大侠了

论坛徽章:
0
4 [报告]
发表于 2012-11-28 15:24 |只看该作者
楼主没有说清楚,就自动清空chinacache。

一种传参数,将变量传给chinacache,一次只能清一个cache.

二种写要清的url写一个文件
while read line
do
#chinacache
done < YRFILE

论坛徽章:
0
5 [报告]
发表于 2012-11-28 18:23 |只看该作者
todayhero 发表于 2012-11-28 15:24
楼主没有说清楚,就自动清空chinacache。

一种传参数,将变量传给chinacache,一次只能清一个cache.

我的意思就是按照chinacache官方的API来刷新啊,我已经贴出来了,没什么参数啊,就是url和dir

论坛徽章:
0
6 [报告]
发表于 2012-11-30 04:40 |只看该作者
  1. #!/bin/sh

  2. while getopts ud opt
  3. do
  4.     case $opt in
  5.         u)  type=urls;;
  6.         d)  type=dirs;;
  7.     esac
  8. done

  9. cat $2 | while read line
  10. do
  11.   echo "curl -s http://ccms.chinacache.com/index.jsp?user=username&pswd=password&ok=ok&$type=$line"
  12. done
复制代码
使用refresh.sh -<u|d> <file>, 通过传入参数  -u或者 -d,来确定你要刷新的是url还是dir
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP