Fetch twitter feed on your Form

Here’s a way to fetch twitter feed on form.

Twitter provides RSS feed of every account, provided account visibility is Public.

If you are using New twitter, you’ll have to find out your twitter feed link by

1] either leave new twitter preview and find RSS links on right sidebar, or
2] click on the RSS Feed icon in browser addressbar. It will probably show your favorites feed. Note the userid from URL.

Now, use that userid in this fashion :
http://twitter.com/statuses/user_timeline/userid.rss

Once you get your twitter feed rss url, its simple to fetch entries.

Sample code using my twitter feed :

You’ll need a RichTextBox and a Button on form. Keep default names.

	Dim items As Xml.XmlNodeList = FetchTwitterFeed("http://bit.ly/hbsM7i")
	'Iterate and print each title
	For Each item As System.Xml.XmlNode In items
		RichTextBox1.AppendText(item.ChildNodes(0).InnerText & vbCrLf)
		'childNodes(0) gives title
		'for rest node indices like link,time etc
		'check source string
	Next

Read more for FetchTwitterFeed() Function –

Continue reading

Retrieve Information using domaintools api

Retrieve network information of computer connected to internet, using iptools xml api.

domaintools provides nice XML file with client network information. One can easily access this file to retrieve the information.

Imports System.Xml
Imports System.IO
Imports System.Net

Public Class Form1
    Dim domainTools As New Dictionary(Of String, String)

    Private Sub retrieveInformation()

        Dim xmlDoc As New XmlDocument

        Dim webRequest As WebRequest = webRequest.Create("http://ip-address.domaintools.com/myip.xml")
        Dim webResponse As WebResponse = webRequest.GetResponse
        Dim webStream As Stream = webResponse.GetResponseStream

        xmlDoc.Load(webStream)

        For Each element As XmlNode In xmlDoc.DocumentElement.ChildNodes
            domainTools.Add(element.Name, element.InnerText)
        Next

        'domainTools dictionary now holds all the information
        'Usage :
        MsgBox(domainTools("ip_address"))

    End Sub

End Class