# Do a simple test
curl --data "ucode=631102&type=10&content=吃饭那" weichuan.cn/api/web/transmit
# Use weichuan for monitor
# 自动报告ip地址脚本
## 更新 20121121
curl --data "ucode=631102&type=20&content=`ifconfig ppp0 | grep inet | awk '{print $2}'`" weichuan.cn/api/web/transmit
## 更新 20121123
curl --data "ucode=631102&type=20&content=`date && ifconfig ppp0 | grep inet | awk '{print $2}' && echo -n \"OnlineUser:\" && arp -an | grep ether | wc -l` " weichuan.cn/api/web/transmit
curl --data "ucode=zzlyzq&type=20&content=`date && ifconfig ppp0 | grep inet | awk '{print $2}' && echo -n \"OnlineUser:\" && arp -an | grep ether | wc -l` " weichuan.cn/api/web/transmit
/tmp/mnt/sda1/shells/tellme.sh
# Make a cron job on Tomato Router OS
cru a tellme "*20 * * * * /tmp/mnt/sda1/shells/tellme.sh"
# some key words or value or types in weichuan
ucode=631102
# URL
type=10 content=test
# 文字
type=20 content=adsfdsf
# 电话
type=30 content=15901022222
# 其他类型
type=40 content=mailto://zzlyzq@126.com
type=40 content=facetime://zzlyzq@126.com
# curl reference
http://wenku.baidu.com/view/1ae09dd43186bceb19e8bb22.html
没有评论:
发表评论