blah blah blah is here! blah blah » Close

up0down
link

Hi,


how to get Internet Explorer address bar information? When i`m type in to address bar e.g. www.google.com, i want to get message with the same URL. How to get this?

I work with C#.

can anyone help me?

last answered one year ago

2 answers

up0down
link

i think you can't do it easily since there are many versions of IE and beside that the user might use other web browser. the thing you can make is to make a keylogger to get the keyboard chars hits by the user or make a sniffer to get the ip the user is logging at.

up0down
link

Although it's not much fun trying to do this using the Win32 API, it's surprisingly easy to do it by adding a reference to Microsoft Internet Controls on the COM tab to your project.

The following worked fine when I tried it just now:

using System;
using SHDocVw;

namespace IETest
{
class Program
{
static void Main()
{
ShellWindowsClass swc = new ShellWindowsClass();
foreach (InternetExplorer ie in swc)
{
Console.WriteLine(ie.LocationURL);
}
Console.ReadKey();
}
}
}

Feedback