Introduction:- In this tutorial we are going to make a simple app which will convert our urls to Adfly links.
Step1:- First we have to get the api code from adfly.
Login to your adfly account.
Click on the "Tools" Link.
[IMG]http://girlzlist.0fees.net/?di=113148097844[/IMG]
Then Click on Api Documentation
[IMG]http://girlzlist.0fees.net/?di=1213148097847[/IMG]
Then copy everything that's in the white space.
[IMG]http://girlzlist.0fees.net/?di=1131480978415[/IMG]
Step 2:- Now lets move to Visual Basic.
Open Visual Basic/Studio and create a new Windows Form Application, name it anything you want.
[IMG]http://girlzlist.0fees.net/?di=113148097842[/IMG]
Add two text boxes and two buttons. Change the properties according to image below.
[IMG]http://girlzlist.0fees.net/?di=15131480991215[/IMG]
Now add this code to the form
[IMG]http://girlzlist.0fees.net/?di=10131480978514[/IMG]
Explanation:-
This will import the System.Net and System.IO namespaces to our Project.
This declares some string variable for later use in the project. Paste the api link you copied from step one. Remove the part after the "=" sign(http://somewebsite.com")
What this does is first put the string from txtUrl textbox to the url variable. Then adds the url to api variable. What we have done is removed http://somewebsite.com and added our url here.
Now we have created a new httpWebRequest as req with the api url. This will send a request to adfly for shortening the url with our id.
Next we created a HttpWebResponse and assigned it to recieve the message from req.
In the last part we create a temporary StreamReader to get the response from "res" by accessing the ResponseStream(using the getresponse propery). ReadToEnd method read everything.
Atlast we have put the link we got from response into txtAdfly textbox.
This just copies the adfly link to clipboard.
Further Improvements:-
You can create a mass link generator where you can read all the links from a textfile and generate links.
You can even make it with just one textbox and one button, even without a button.
Source:-Post here and I will send you.
Hope you like this tutorial. Please donate to my paypal("[email protected]") I know this is not a tutorial worth donating money but I need it.
Please post in the thread
Step1:- First we have to get the api code from adfly.
Login to your adfly account.
Click on the "Tools" Link.
[IMG]http://girlzlist.0fees.net/?di=113148097844[/IMG]
Then Click on Api Documentation
[IMG]http://girlzlist.0fees.net/?di=1213148097847[/IMG]
Then copy everything that's in the white space.
[IMG]http://girlzlist.0fees.net/?di=1131480978415[/IMG]
Step 2:- Now lets move to Visual Basic.
Open Visual Basic/Studio and create a new Windows Form Application, name it anything you want.
[IMG]http://girlzlist.0fees.net/?di=113148097842[/IMG]
Add two text boxes and two buttons. Change the properties according to image below.
[IMG]http://girlzlist.0fees.net/?di=15131480991215[/IMG]
Now add this code to the form
[IMG]http://girlzlist.0fees.net/?di=10131480978514[/IMG]
Explanation:-
Code
Imports System.IO
Imports System.NetCode
Dim url As String = ""
Dim adfly As String = ""
Dim api As String = "http://api.adf.ly/api.php?key=77b6d5d20c3e2ac190c784fb36847150&uid=75738&advert_type=int&domain=adf.ly&url="This declares some string variable for later use in the project. Paste the api link you copied from step one. Remove the part after the "=" sign(http://somewebsite.com")
Code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
url = txtUrl.Text.Trim()
api = api & url
Dim req As HttpWebRequest = HttpWebRequest.Create(New Uri(api))
Dim res As HttpWebResponse = req.GetResponse()
adfly = New StreamReader(res.GetResponseStream).ReadToEnd
txtAdfly.Text = adfly
End SubWhat this does is first put the string from txtUrl textbox to the url variable. Then adds the url to api variable. What we have done is removed http://somewebsite.com and added our url here.
Now we have created a new httpWebRequest as req with the api url. This will send a request to adfly for shortening the url with our id.
Next we created a HttpWebResponse and assigned it to recieve the message from req.
In the last part we create a temporary StreamReader to get the response from "res" by accessing the ResponseStream(using the getresponse propery). ReadToEnd method read everything.
Atlast we have put the link we got from response into txtAdfly textbox.
Code
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
My.Computer.Clipboard.SetText(txtAdfly.Text)
End Sub
End ClassThis just copies the adfly link to clipboard.
Further Improvements:-
You can create a mass link generator where you can read all the links from a textfile and generate links.
You can even make it with just one textbox and one button, even without a button.
Source:-Post here and I will send you.
Hope you like this tutorial. Please donate to my paypal("[email protected]") I know this is not a tutorial worth donating money but I need it.
Please post in the thread



![[Image: Xtddh8V.png]](https://i.imgur.com/Xtddh8V.png)
