/
home
/
report
/
report
/
utility
/
File Upload :
llllll
Current File: //home/report/report/utility/views.py
from django.shortcuts import render from decouple import config import requests import httpx # Create your views here. def sendSms(mobile,msg): url = "http://www.0098sms.com/sendsmslink.aspx" data = { 'FROM': config('SMS_SENDER'), 'TO' : mobile, 'TEXT': msg, 'USERNAME': config('SMS_USERNAME'), 'PASSWORD': config('SMS_PASSWORD'), 'DOMAIN': config('SMS_DOMAIN'), } # url = "http://www.0098sms.com/sendsmslink.aspx?FROM=3000164545&TO=09136982135&TEXT=هنزا&USERNAME=zsms6916&PASSWORD=a09121227052A&DOMAIN=0098" header = { "Content-Type": "application/json", "Connection": "keep-alive", "Accept":"*/*", "Accept-Encoding":"gzip, deflate, br" } try: # response = httpx.get(url,headers=header) response = requests.get(url, params=data) except: return 'ok'
Copyright ©2k19 -
Hexid
|
Tex7ure