S
Samir Ibrahim
Hi all
I had post a question in msdn forum about how to control or manage the
response from xmlhttp request, I did not got any answer maybe because
they consider it as "malicious code".
any way, I had developed a sms/voice sending software in vb.net, every
thing works fine except if there is weak internet or delay from the
server I am sending my request to it.
I am using Microsoft XML v4 my code look like this
Let suppose I am trying to send request to imdb.com (for testing)
Public _xmlHTTP As New MSXML2.XMLHTTP ' declared in a module
Dim strResult As String
_xmlHTTP.open("POST", "http://www.imdb.com/find?s=tt", False)
_xmlHTTP.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded")
Dim parameter = "AVATAR" ' Movie name
Dim _sendText = "&q=<movie_name>".Replace("<movie_name>",parameter)
Application.DoEvents()
' send the request and the server should give response
_xmlHTTP.send(_sendText) ' here is where i want to put control.
strResult = _xmlHTTP.responseText
MsgBox(strResult)
End If
I am sending sms messages to a group, that group may consist of 1
person, or 1000 person. I am doing that be looping, so if for example i
am sending the message to a group that has 50 person, and in my loop I
reach 30, and the server hang or did not response
my program behaviour is: wait until the server response so it proceed
with the next send
what I want : giving the server 1 sec, if not response came, skip it and
send the next.
Can that be done?
TIA
Samir Ibrahim
I had post a question in msdn forum about how to control or manage the
response from xmlhttp request, I did not got any answer maybe because
they consider it as "malicious code".
any way, I had developed a sms/voice sending software in vb.net, every
thing works fine except if there is weak internet or delay from the
server I am sending my request to it.
I am using Microsoft XML v4 my code look like this
Let suppose I am trying to send request to imdb.com (for testing)
Public _xmlHTTP As New MSXML2.XMLHTTP ' declared in a module
Dim strResult As String
_xmlHTTP.open("POST", "http://www.imdb.com/find?s=tt", False)
_xmlHTTP.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded")
Dim parameter = "AVATAR" ' Movie name
Dim _sendText = "&q=<movie_name>".Replace("<movie_name>",parameter)
Application.DoEvents()
' send the request and the server should give response
_xmlHTTP.send(_sendText) ' here is where i want to put control.
strResult = _xmlHTTP.responseText
MsgBox(strResult)
End If
I am sending sms messages to a group, that group may consist of 1
person, or 1000 person. I am doing that be looping, so if for example i
am sending the message to a group that has 50 person, and in my loop I
reach 30, and the server hang or did not response
my program behaviour is: wait until the server response so it proceed
with the next send
what I want : giving the server 1 sec, if not response came, skip it and
send the next.
Can that be done?
TIA
Samir Ibrahim