Intercept address line for Internet Explorer

How can i find out what address has just been typed into internet explorer
and then alter the address and then resubmit.

Code For vb6 please

Id like to intercept the address line

thanks experts.

Who is Participating?

Improve company productivity with a Business Account.Sign Up

nichiaConnect With a Mentor Commented:
You could create a "Browser Helper Object" to do this.

If you are up for the challenge I can point you in the right direction.  Basically, the BHO is a process which is loaded by every instance of IE (via a registry entry).  BHO's are what popup blockers and other net nannys use to modify or "help" the behavior of Internet Explorer.

It's not so easy, but doable.

I have found a good working example using VB at this site:

Download the sample program (bho and we will take it from there. (you need to register as a member, but it's free)

Basically, this sample intercepts the BeforeNavigate2 event of the browser - which is exactly what you want.  I tried it and it works well.  Go ahead and load the program and I will talk you throught the process.

Later -

Jimmyx1000Author Commented:
Id like to design some parental software

Once i have the address id like to check this address against a list of
known adult sites and then stop the page or redirect to a safe page.

thanks experts

IE has content control.
Tools->Internet Options->[Content]

You can choose sites to allow or disallow, etc.

Hope it helps.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

This snippet may also help you

Option Explicit

'You must first add a reference to Microsoft Internet Controls from the Project->References menu
Private Sub Command1_Click()
    Dim shWnd As New ShellWindows
    Dim ie As InternetExplorer
    Dim sURL As String
    For Each ie In shWnd
        sURL = ie.LocationURL
        sURL = LCase(sURL)
        'Redirect all EE windows to
        If InStr(1, sURL, "experts-exchange") Then
            ie.Navigate2 ""
        End If
End Sub
Jimmyx1000Author Commented:
what i need is vb to check externally the condition of internet explorer

when an address is actually typed in internet explorer after the return key is pressed
i need to know that return has been pressed and then manipulate this intercept
and then return a value or new address to internet explorer .

thanks experts

Jimmyx1000Author Commented:
Ok Downloading Now.

Id love to do this stuff  nichia
Jimmyx1000Author Commented:
Ok program download what should i do now

can get this to work

how can i get this to work.
Here is a step-by-step of how I got it to work.

1.  Close all open IE windows.
2.  Double click on the file register.reg (which came with the example) to add the entry for this BHO to the registry.
3.  Double click browserhelper.vbp to open the project in VB
4.  Find the section of code in the moBrowser_BeforeNavigate2 event.
     This code is what we will be most interested in.
     Comment out the MsgBox Cstr(URL) line.
     Add this for testing:
     Debug.print CStr(URL)
5.  Run the project.
6.  Open an Internet Explorer window.  
     You should hear a beep just before it loads, and the URL(s) will print out in the debug window.
     When you are done, close the IE windows, then stop the project.

Let me know how you make out.

Double click un-register.reg to remove the registry entries for this BHO (optional).
Did you get this to work yet?
Please let me know if you need more help getting this to work.
Jimmyx1000Author Commented:

Just trying this program , im trying to redirect the web page  to a diffrent one ,

do you know how  i can do this using the above program


Yes I do.
Jimmyx1000Author Commented:
How can i change the code so i geta redirect
he may be in jail by now .... :)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.