本文共 437 字,大约阅读时间需要 1 分钟。
主要技术是使用python 的 urllib2和urllib库
代码如下:
def send_sys(url, account, password, mobile, content):
data = {} data['account'] = account #测试了多家短信接口提供商,基本参数都是帐号,密码,接收手机号,内容(会稍有不没)。 data['password'] = password data['mobile'] = mobile data['content'] = content #url = 'http://106.ihuyi.cn/webservice/sms.php?method=Submit' 这是我测试的短信接口发送url,每个短信接口提供商的url是不一样的 data = urllib.urlencode(data) response = urllib2.urlopen(url, data) html = response.read()转载地址:http://yxvws.baihongyu.com/