wow, you couldent of picked a shitter file host could you?
* edit so nobody else has to go through all that shit
*
Code
Public Class Form1
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
wBro.GoBack()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
wBro.GoForward()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
wBro.GoHome()
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
' We should first check to see if the TLD in the url box is one of our private TLDs.
Dim tld = getTLD() ' Grab the TLD using our custom function we programmed
If tld = "pld" Then ' PLD is our Private Level Domain extension that we are going to use for this project
' It is our PLD, so have the browser grab the special private server information and have it open
Dim url As String
url = txtURL.Text.Replace("http://", "")
url = url.Replace("https://", "")
wBro.Navigate(getPLDServer(url))
Else
' It isn't our PLD, so we will have the web browser load it normally.
wBro.Navigate(txtURL.Text)
End If
End Sub
Private Function getTLD()
Dim url As String() = txtURL.Text.Split(".")
Dim tld As String = url(url.Count - 1)
Return tld
End Function
Private Function getPLDServer(ByVal pURL As String)
Dim pServer As String = Nothing
Dim rServer As New System.IO.StreamReader("dns.txt")
Do Until rServer.EndOfStream
Dim curLine As String = rServer.ReadLine
If curLine.Split(":")(0).ToLower = pURL.ToLower Then
pServer = curLine.Split(":")(1)
End If
Loop
rServer.Close()
If pServer = Nothing Then
pServer = "file://" & Application.StartupPath & "/404.html" ' The PLD was not found in the database
End If
Return pServer
End Function
End Class