URL Shortener

Blessing

User is banned.
Reputation
0
Today, I'm going to teach you how to make a URL Shortener.

You'll need:

Visual Basic 2008/2010 (I'm using 2008)
2 Labels
2 Textbox
1 Button

Editing The Texts (NOT THE NAMES):

Edit Label1 to "URL To Shorten"
Edit Label2 to "Shortened URL"
Edit Button to "Shorten!"

Should look something like this:


Now For Coding:

At this at the very top!
[vb]Imports System.Net ' This imports System.Net[/vb]

Add this into Button1
[vb]Dim wc As New WebClient ' Substitutes WebClient as wc
Dim strings As String ' Makes strings as a string
strings = wc.DownloadString("http://tinyurl.com/api-create.php?url=" & TextBox1.Text) ' It copies the texts in the site which saves in strings
wc.Dispose() ' Disposes the WebClient
TextBox2.Text = strings ' Pastes the text in strings onto TextBox2[/vb]

And your done!
 
Good Stuff m8 good stuff

Definitly Useful for Google Picture Links which is huge
 
You could also include a adf.ly link shortener, that way you get a bit of cash for each click
 
Really. Its almost exaactly the same, you just need to get the right refer url and adf.ly id.

Im sure we could develop this futher
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…