-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsms.py
More file actions
67 lines (31 loc) · 1.32 KB
/
sms.py
File metadata and controls
67 lines (31 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import tkinter as tk
from tkinter import*
from tkinter import messagebox
import requests
root = tk.Tk()
root.geometry('200x200')
root.maxsize(300,300)
root.minsize(300,300)
root.title('Send SMS')
def send_sms():
number = phone_no.get()
messages = message.get("1.0","end-1c")
url = "https://www.fast2sms.com/dev/bulk"
api = "Enter your api here" #fast2sms api
querystring = {"authorization":api,"sender_id":"FSTSMS","message":messages,"language":"english","route":"p","numbers":number}
headers = {
'cache-control': "no-cache"
}
requests.request("GET", url, headers=headers, params=querystring)
messagebox.showinfo("Send SMS",'SMS has been send successfully')
label = Label(root,text="Send SMS Using Python",font=('verdana',10,'bold'))
label.place(x=60,y=20)
phone_no = Entry(root,width=20,borderwidth=0,font=('verdana',10,'bold'))
phone_no.place(x=60,y=100)
phone_no.insert('end','phone number')
message = Text(root,height=5,width=25,borderwidth=0,font=('verdana',10,'bold'))
message.place(x=40,y=140)
message.insert('end','Message')
send = Button(root,text="Send Message",font=('verdana',10,'bold'),bg='blue',cursor='hand2',borderwidth=0,command=send_sms)
send.place(x=90,y=235)
root.mainloop()