first push
This commit is contained in:
17
Authentication/sms.py
Normal file
17
Authentication/sms.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import requests
|
||||
|
||||
|
||||
def send_otp_code(receptor, rand):
|
||||
receptor = str(receptor)
|
||||
message = 'سلام همراه عزیز کد پیامکی ارسالی برای شما :{}'.format(rand)
|
||||
u = "http://webservice.sahandsms.com/newsmswebservice.asmx/SendPostUrl?username=pmstores&password=Aht00100&from=30002501&to={}&message={}".format(
|
||||
receptor, message)
|
||||
|
||||
url = u.format()
|
||||
|
||||
payload = {}
|
||||
headers = {"Content-Type": "application/x-www-form-urlencoded"}
|
||||
|
||||
response = requests.request("GET", url, headers=headers, data=payload, verify=False)
|
||||
|
||||
print(response.text)
|
||||
Reference in New Issue
Block a user