Wheezy Server语言 - 基于 Python / PHP 的 API 脚本



我正在使用Plivo,一个语音/短信API。 它目前设置正确并在我的服务器上工作,但我的编码器无法再处理它,所以我正在尝试应对。

我需要如何执行以下操作的基本步骤:

1: 创建 150 个脚本

使用以下模板:

import plivo
auth_id = "Your AUTH_ID"
auth_token = "Your Auth_TOKEN"
p = plivo.RestAPI(auth_id, auth_token)
params = {
'src': '1111111111', # Sender's phone number with country code
'dst' : '2222222222<3333333333', # Receivers' phone numbers with country code. The numbers are separated by "<" delimiter.
'text' : "Hi, from Plivo" # Your SMS Text Message
}
response = p.send_message(params)
# Print the entire response
print str(response)
# Sample sucessful output
# (202, {
#       u'message': u'message(s) queued',
#       u'message_uuid': [
#               u'2d55d550-8a73-11e4-9bd8-22000afa12b9',
#               u'2d5617e0-8a73-11e4-89de-22000ae885b8'
#       ],
#       u'api_id': u'2d30af46-8a73-11e4-96e3-22000abcb9af'
#       }
# )
# Print only the status code
print response[0]
# Sample successful output
# 202
# Print the message uuid
print response[1]['message_uuid']

  1. a(src 每个脚本需要 1,取自 150# 列表

  2. b(每个脚本需要 200 个,取自一个巨大的列表文件

  3. 然后,我需要能够使用命令运行脚本 001..150。

附言请记住,我对编码知之甚少。 我基本上理解,但我不主动编码。

谢谢!

这是同时的快速修复。

手动添加数字 001..150

然后使用编辑器在 # 列表文件中的每一行末尾添加>。 复制粘贴每个脚本 200 个条目。

最新更新