0

Im using api from SMS provider .

Dim url As String
url = "http://weburl.jsp?usr=abc&pass=def&msisdn=95786123384645&sid=ABC&msg=welcome&mt=0"
webbrowser1.navigate(url)

The url i got from provider. Is there any other better way of sending sms using api ?

there is also api for balance which returns balance. Now i want to put this balance in label. How to do this?

http://weburl/CreditCheck.jsp?usr=abc&pass=def  

Copy pasting above on browser displays balance but i want this to be in label.

Im using vb.net 2008 windows app,

Thanks in advance.

Sam
  • 7,252
  • 16
  • 46
  • 65
aj1
  • 29
  • 1
  • 8

1 Answers1

0

You can use HttpWebRequest and HttpWebResponse, something like this...

Dim sUrl As String = "http://weburl/CreditCheck.jsp?usr=abc&pass=def"

Dim wRequest As HttpWebRequest = DirectCast(System.Net.HttpWebRequest.Create(sUrl), HttpWebRequest)

wRequest.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials 'Not always needed
wRequest.Method = "GET"

Dim wResponse As HttpWebResponse = DirectCast(wRequest.GetResponse(), HttpWebResponse)

Dim sResponse As String = ""

Using srRead As New StreamReader(wResponse.GetResponseStream())
    sResponse = srRead.ReadToEnd()
End Using

You will then need to parse the result to extract your balance

Ciarán
  • 3,017
  • 1
  • 16
  • 20
  • can you have a look at my other qtn :http://stackoverflow.com/questions/16008340/minimize-vb-net-forms-to-mdiparent-bottom-eg-adobe-photoshop No one answered on this – aj1 Apr 29 '13 at 13:56