python实现dnspod自动更新dns解析的方法
Jun 06, 2016 am 11:29 AM代码如下:
def ddns():
"""
用当前ip更新ddns
"""
headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/json"}
conn = httplib.HTTPSConnection("dnsapi.cn", timeout=30)
conn.request("POST", "/Record.Ddns", urllib.urlencode(ddns_params), headers)
response = conn.getresponse()
# print response.status, response.reason
# data = response.read()
# print data
conn.close()
return response.status == 200

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to disable Windows Update from automatically updating drivers in win11?

How to disable automatic updates in Win11

Group policy method to turn off automatic updates in win10

How to turn off automatic updates when downloading office 2016 - How to turn off automatic updates when downloading office 2016

Linux system network download slowness and disconnection problems and solutions

How to develop a feature that automatically updates a WordPress plugin

How does Kirin OS provide automatic update and upgrade functions?
