Sub Send_SMS(msg As String ,tonumber As String)
Dim smsurl As String="https://ippanel.com/api/select"
Dim token As String = "fi3IVytk8Pdu8r0wQM=654515678578"
Dim objMap As Map
objMap.Initialize
objMap.Put("op" , "send")
objMap.Put("uname","1545140241")
objMap.Put("pass","155454")
objMap.Put("message" , msg)
objMap.Put("from", "454151005")
objMap.Put("to" , tonumber)
objMap.Put("time" , "")
Dim objJSon As JSONGenerator
objJSon.Initialize(objMap)
Dim j As HttpJob
j.Initialize("j",Me)
j.PostString(smsurl,objJSon.ToPrettyString(2))
j.GetRequest.SetContentType("application/json")
j.GetRequest.SetHeader("authorization",token )
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
Dim parser As JSONParser
parser.Initialize(j.GetString)
Dim m As List = parser.NextArray
Dim state As Int = m.Get(0)
If state<>0 Then
log("ok")
End If
Else
log("error")
End If
j.Release
End Sub