I hope I understand your question right. Your current code sends the sms one by one, and you want to send 99 smss in one. If that is your intention you were half way down. You could change your sending code to
Dim objFS As New FileStream("c:\test.sms", FileMode.Open, FileAccess.Read)
Dim objSR As New StreamReader(objFS)
Dim counter As Int32 = 1
Dim num As System.Text.StringBuilder = New System.Text.StringBuilder(200)
Dim strline, fileline() As String
Do While (objSR.Peek <> -1)
strline = objSR.ReadLine
fileline = strline.Split(vbTab)
Dim strnum As String = fileline(0)
Dim strmsg As String = fileline(1)
If counter > 1 Then
num.Append(",")
End If
num.Append(strnum)
If (counter Mod 99 = 0) OrElse (objSR.EndOfStream) Then
Dim request As HttpWebRequest
Dim response As HttpWebResponse = Nothing
Dim url As String
Dim host As String = "http://southafrica.msg91.com"
Dim senderid As String = "Test"
Try
url = host + "/sendhttp.php?" _
& "user=" + HttpUtility.UrlEncode(user) _
& "&password=" + HttpUtility.UrlEncode(password) _
& "&mobiles=" + HttpUtility.UrlEncode(num.ToString()) _
& "&message=" + HttpUtility.UrlEncode(strmsg) _
& "&sender=" + HttpUtility.UrlEncode(senderid)
request = DirectCast(WebRequest.Create(url), HttpWebRequest)
response = DirectCast(request.GetResponse(), HttpWebResponse)
Catch ex As Exception
MsgBox(ex.Message)
End Try
counter += 1
num = New System.Text.StringBuilder(200)
End If
Loop
I've intergrated your loop with your current code using the mod statement to test if 99 messages are read and the StreamReader.EndOfStream to test if the end of the stream is reached.
I've change the 'num as String' to a 'num as StringBuilder'. If you are concatinating a lot of string values the StringBuilder has a beter preformence (and memory usage).
I couldn't test the code as it might send data. I hope it will work.