• 144 Vote(s) - 2.35 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to asp.net adfly URL Shorting
Quote: Nasıl adfly URL Apı örnek kod kısa Devre asp.net ?
Public Shared Function Shorten(url As String) As String
       Dim key As String = "$MYGOOGLEAPIKEY$"
       Dim post As String = "{""longUrl"": """ & url & """}"
       Dim shortUrl As String = url
       Dim request As HttpWebRequest = DirectCast(WebRequest.Create("https://www.googleapis.com/urlshortener/v1/url?key=" & key), HttpWebRequest)
           request.ServicePoint.Expect100Continue = False
           request.Method = "POST"
           request.ContentLength = post.Length
           request.ContentType = "application/json"
           request.Headers.Add("Cache-Control", "no-cache")
           Using requestStream As Stream = request.GetRequestStream()
               Dim postBuffer As Byte() = Encoding.ASCII.GetBytes(post)
               requestStream.Write(postBuffer, 0, postBuffer.Length)
           End Using
           Using response As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
               Using responseStream As Stream = response.GetResponseStream()
                   Using responseReader As New StreamReader(responseStream)
                       Dim json As String = responseReader.ReadToEnd()
                       shortUrl = Regex.Match(json, """id"": ?""(?<id>.+)""").Groups("id").Value
                   End Using
               End Using
           End Using
       Catch ex As Exception
           ' if Google's URL Shortner is down...
       End Try
       Return shortUrl
   End Function

Ac Market
Ac market downloading
Ac market latest version
download Ac Market
Ac market apk
Ac Market download
Ac market ios

Forum Jump:

Users browsing this thread: 1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: './pxramin_parsii/mybb_threadviews.MYI' (errno: 2 "No such file or directory")
INSERT INTO mybb_threadviews (tid) VALUES('3708')