What is the best method in extracting the URL which the user has just typed into the address bar in a browser (IE and Netscape).

I hope to create a simple blocking program that compares the typed URL with a list of approved URL. If the URL is approved, then the web page will be displayed on the screen.

I was thinking of monitoring the winsock for HTTP request packets. Please advise

Thank you in advance