How to Check Credit Balance With PHP VB.net
You can apply the scripts to your VB.net website or any web based applications. Integrate the check SMS balance feature into your VB.NET application that allows you to keep track of your SMS balance anytime, anywhere.
Download VB.NET Demo FilesPlease click below to find out about our send SMS API in other programming languages.
After compiling your application, the balance credit available in your iSMS Philippines account will be returned to you as string.
Imports System.IO
Imports System.Text
Public Function getBalance(ByVal iSMSusername As String, ByVal iSMSpassword As String) As String
Dim url As New System.Uri("http://www.isms.com.my/isms_balance.php?un=" + iSMSusername + "&pwd=" + iSMSpassword)
Dim req As System.Net.WebRequest
req = System.Net.WebRequest.Create(url)
Dim resp As System.Net.WebResponse
Try
resp = req.GetResponse()
Dim reader As StreamReader = New StreamReader(resp.GetResponseStream())
Dim balance_str As String = Trim(Strip(reader.ReadToEnd().Trim()))
resp.Close()
req = Nothing
Return balance_str
Catch ex As Exception
req = Nothing
Return ""
End Try
Return False
End Function
Imports System.Text
Public Function getBalance(ByVal iSMSusername As String, ByVal iSMSpassword As String) As String
Dim url As New System.Uri("http://www.isms.com.my/isms_balance.php?un=" + iSMSusername + "&pwd=" + iSMSpassword)
Dim req As System.Net.WebRequest
req = System.Net.WebRequest.Create(url)
Dim resp As System.Net.WebResponse
Try
resp = req.GetResponse()
Dim reader As StreamReader = New StreamReader(resp.GetResponseStream())
Dim balance_str As String = Trim(Strip(reader.ReadToEnd().Trim()))
resp.Close()
req = Nothing
Return balance_str
Catch ex As Exception
req = Nothing
Return ""
End Try
Return False
End Function