Created
November 17, 2016 09:37
-
-
Save lialosiu/deaa969f7b5a28b8f0151fa4bd3e6190 to your computer and use it in GitHub Desktop.
dnspod ddns php更新脚本
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$id = isset($_GET['id']) ? $_GET['id'] : null; | |
$token = isset($_GET['token']) ? $_GET['token'] : null; | |
$domain = isset($_GET['domain']) ? $_GET['domain'] : null; | |
$host = isset($_GET['host']) ? $_GET['host'] : null; | |
$record_id = isset($_GET['record_id']) ? $_GET['record_id'] : null; | |
$ip = isset($_GET['ip']) ? $_GET['ip'] : null; | |
$rsp = exec("/opt/bin/curl -X POST https://dnsapi.cn/Record.Ddns -d 'login_token=$id,$token&format=json&domain=$domain&sub_domain=$host&record_id=$record_id&record_line_id=0&value=$ip'"); | |
syslog(LOG_INFO, $rsp); | |
echo $rsp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment