Freeware URL Parser ActiveX Component

This is a simple and free ActiveX component for parsing a URL and extracting the component parts such as host, port, path, query, and fragment. It can be used in ASP, VBScipt, Visual Basic, and any other programming language that supports ActiveX components.

Download Here

How to Use

Simply download the Zip distribution and unzip. Register the DLL using regsvr32.exe. The following sample VBScript is included in the download and demonstrates the functionality of this component:


' This VBScript example serves as the documentation for this free ActiveX component.
' To use the component, simply unzip the distribution package and register
' the DLL using regsvr32.

' URL ActiveX creation:
set u = CreateObject("Url.ParseUrl")

' URLs have the general format:
' http[s]://<user>:<password>@<host>:<port>/<path>?<query>#<frag>

' First set the Url property, then get the parts.
u.Url = "http://music.yahoo.com/launchcast/lister/default.asp?listType=album.rated"
MsgBox "New URL: " & u.Url

' Display the host (music.yahoo.com)
MsgBox "Host = " & u.Host

' Display the path (/launchcast/lister/default.asp)
MsgBox "Path = " & u.Path

' Display the query (listType=album.rated)
MsgBox "Query = " & u.Query

' Try another URL:
u.Url = "https://JohnDoe:MyPassword@www.mysite.com:8080/junk.asp?a=b#bottom"
MsgBox "New URL: " & u.Url

' Display the user (JohnDoe)
MsgBox "User = " & u.User

' Display the password (MyPassword)
MsgBox "Password = " & u.Password

' Display the port (8080)
MsgBox "Port = " & u.Port

' Display the path (<empty>)
MsgBox "Path = " & u.Path

' Display the query (<empty>)
MsgBox "Query = " & u.Query

' Display the frag (bottom)
MsgBox "Frag = " &u.Frag



About Tortuga

Tortuga Group LLC is in the business of building a new index for the World Wide Web at http://www.worldwideweb-x.com. The company has decided to make available some of its internally used ActiveX components to the general public. We hope you find them to be useful.

Hardware-X.com

Pad File


Copyright 2005 Tortuga Group LLC