6.4 Python版本的短信接口示例代码
2017-04-25 00:00
323 查看
#coding=utf-8
import urllib
import urllib2
import time
import hashlib
def md5(str):
import hashlib
m = hashlib.md5()
m.update(str)
return m.hexdigest()
url = 'http://60.205.14.180:9000/HttpSmsMt'
timenew= time.strftime("%Y%m%d%H%M%S", time.localtime(time.time()))
pwd = md5(密码+timenew)
values = {'name':用户名,'pwd':pwd,'content':'【阅信】验证码888888。
','phone':'13400000000','subid':'','mttime':timenew}
# values = {'name':用户名,'pwd':pwd,'content':'123456','phone':'13400000000','subid':'','mttime':timenew} 语音验证码内容
data = urllib.urlencode(values)
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
the_page = response.read()
print the_page
文章来源:http://www.jinloushiji.cn
import urllib
import urllib2
import time
import hashlib
def md5(str):
import hashlib
m = hashlib.md5()
m.update(str)
return m.hexdigest()
url = 'http://60.205.14.180:9000/HttpSmsMt'
timenew= time.strftime("%Y%m%d%H%M%S", time.localtime(time.time()))
pwd = md5(密码+timenew)
values = {'name':用户名,'pwd':pwd,'content':'【阅信】验证码888888。
','phone':'13400000000','subid':'','mttime':timenew}
# values = {'name':用户名,'pwd':pwd,'content':'123456','phone':'13400000000','subid':'','mttime':timenew} 语音验证码内容
data = urllib.urlencode(values)
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
the_page = response.read()
print the_page
文章来源:http://www.jinloushiji.cn
相关文章推荐
- eoLinker-API_Shop_短信服务接口-调用示例代码,支持PHP、Python、Java等语言
- 基于python的短信接口调用代码示例模板
- C++短信发送接口代码示例 demo分享
- Python实现登录接口的示例代码
- 基于C#的短信接口调用示例代码模板
- 基于PHP的短信接口调用示例代码模板
- 编写同时兼容Python2.x与Python3.x版本的代码的几个示例
- 聚合短信PHP代码示例短信接口调用CURL方法
- 短信http接口的java代码调用示例
- 基于PHP的短信接口调用示例代码
- CentOS6.4升级Python到2.7版本 , 用vim写python代码
- SSIS 错误代码 DTS_E_OLEDB_EXCEL_NOT_SUPPORTED 没有可用的 OLE DB 访问接口 SSIS 的 64 位版本中不支持 Excel 连接管理器
- python3代码示例1
- 转:python嵌入代码示例
- Iphone的发送短信-邮件-打电话代码示例(转)
- Python压缩文件基本应用代码示例解读
- 在python中如何重定向标准输出stdout到文件代码示例
- Android发送接收短信的代码示例
- Android发送接收短信的代码示例
- Csharp中的关键字示例及代码演示之接口