Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
ZTE MF283U 4G Unlocked Router (Used)
ayanthamaxi
Updated:
Jul 19, 2026
ලංකාවේ හොඳම උපකාරක පන්ති සහ ගුරුවරුන් එකම තැනකින් - TopTuition.lk
dulithapathum
Updated:
Jul 18, 2026
Colombo
RidhMathraa ’26 🎶✨
Tmadhusanka
Updated:
Jul 15, 2026
Ad icon
Colombo
PXN V10 Pro Direct Drive Racing Wheel (Under Warranty)
Abdur Rahman
Updated:
Jul 15, 2026
Ad icon
USDT ණය සේවාව - USDT Loan Service
පුරවැසියා
Updated:
Jul 15, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
php to vb.net උදවු
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="charith84" data-source="post: 24616222" data-attributes="member: 1146"><p>[CODE]</p><p></p><p> Public Sub JasonWebRequest()</p><p> ' Declarations</p><p> Dim username As String = "charith84"</p><p> Dim usrpass As String = "password"</p><p> Dim postStr As String = "{""messages"" : [{""number"": ""ghgy"",""mask"": ""abc"",""text"": ""This test"",""campaignName"":""abc12"" }]}';"</p><p> Dim pwHash As String = Nothing</p><p> Dim timeNow = TimeZoneInfo.ConvertTime(Now, TimeZoneInfo.FindSystemTimeZoneById("Sri Lanka Standard Time"))</p><p> ' Creating Md5 Hash</p><p> Using hash As Security.Cryptography.MD5 = Security.Cryptography.MD5.Create()</p><p> Dim strHash As Text.StringBuilder = New System.Text.StringBuilder</p><p> Dim pwBytes() As Byte = hash.ComputeHash(System.Text.Encoding.UTF8.GetBytes(usrpass))</p><p> For bIndex As Integer = 0 To pwBytes.Length - 1</p><p> strHash.Append(pwBytes(bIndex).ToString("X2"))</p><p> Next bIndex</p><p> pwHash = strHash.ToString</p><p> End Using</p><p> ' Creating WebRequest</p><p> Dim request As Net.HttpWebRequest = DirectCast(Net.HttpWebRequest.Create("http://www.elakiri.com"), Net.HttpWebRequest)</p><p> Dim postBytes() = System.Text.Encoding.UTF8.GetBytes(postStr)</p><p> With request</p><p> .Method = Net.WebRequestMethods.Http.Post</p><p> .KeepAlive = True</p><p> .UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"</p><p> .ContentType = "application/json"</p><p> .ContentLength = postBytes.Length</p><p> .Headers("user") = username</p><p> .Headers("digest") = pwHash</p><p> .Headers("create") = timeNow.ToString("y-m-d\\h:m:s")</p><p> End With</p><p> Dim reqStream As IO.Stream = request.GetRequestStream()</p><p> reqStream.Write(postBytes, 0, postBytes.Length)</p><p> reqStream.Close()</p><p> Dim response As Net.HttpWebResponse = DirectCast(request.GetResponse(), Net.HttpWebResponse)</p><p> Using sread As New IO.StreamReader(response.GetResponseStream())</p><p> Dim responsestr As String = sread.ReadToEnd</p><p> MsgBox(responsestr.Length)</p><p> End Using</p><p> End Sub</p><p></p><p></p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="charith84, post: 24616222, member: 1146"] [CODE] Public Sub JasonWebRequest() ' Declarations Dim username As String = "charith84" Dim usrpass As String = "password" Dim postStr As String = "{""messages"" : [{""number"": ""ghgy"",""mask"": ""abc"",""text"": ""This test"",""campaignName"":""abc12"" }]}';" Dim pwHash As String = Nothing Dim timeNow = TimeZoneInfo.ConvertTime(Now, TimeZoneInfo.FindSystemTimeZoneById("Sri Lanka Standard Time")) ' Creating Md5 Hash Using hash As Security.Cryptography.MD5 = Security.Cryptography.MD5.Create() Dim strHash As Text.StringBuilder = New System.Text.StringBuilder Dim pwBytes() As Byte = hash.ComputeHash(System.Text.Encoding.UTF8.GetBytes(usrpass)) For bIndex As Integer = 0 To pwBytes.Length - 1 strHash.Append(pwBytes(bIndex).ToString("X2")) Next bIndex pwHash = strHash.ToString End Using ' Creating WebRequest Dim request As Net.HttpWebRequest = DirectCast(Net.HttpWebRequest.Create("http://www.elakiri.com"), Net.HttpWebRequest) Dim postBytes() = System.Text.Encoding.UTF8.GetBytes(postStr) With request .Method = Net.WebRequestMethods.Http.Post .KeepAlive = True .UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" .ContentType = "application/json" .ContentLength = postBytes.Length .Headers("user") = username .Headers("digest") = pwHash .Headers("create") = timeNow.ToString("y-m-d\\h:m:s") End With Dim reqStream As IO.Stream = request.GetRequestStream() reqStream.Write(postBytes, 0, postBytes.Length) reqStream.Close() Dim response As Net.HttpWebResponse = DirectCast(request.GetResponse(), Net.HttpWebResponse) Using sread As New IO.StreamReader(response.GetResponseStream()) Dim responsestr As String = sread.ReadToEnd MsgBox(responsestr.Length) End Using End Sub [/CODE] [/QUOTE]
Insert quotes…
Verification
Hata thunen beduwama keeyada? (60 bedeema thuna)
Post reply
Top
Bottom