Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sirs,

I want to get the URL from each an every browser when user will open any URL from it. I have searched regarding web traffic capture using SharpPcap.

I have used SharpPcap to get the solutions but sir when i am going to open Yahoo, google or any other link in local PC it gives me all the IP Addresses.

Suppose I am opening http://www.yahoo.com from my google chrome browser and my C# .Net application with SharpPcap is running from background thread. After the site opened and I have checked the log it gives lots of IP Address which is not understandable to me.

Sir, I don't need any IP Address. I need only the name of the URL (like : yahoo.com) which will be opened from my PC.

I want to do the above solutions using my C# .Net application.

Please help me to get the solutions with C# code.


Thanks & Regards
Posted
Comments
[no name] 15-Aug-14 7:40am    
GetHostEntry would probably work for you.

1 solution

That problem with what you're doing is that web browsers do NOT navigate the friendly name you type in the address bar. They will first try to resolve the name to an IP address and then send a HTTP GET request over TCP/IP to one of those IP addresses.

You will NEVER see a friendly URL name go across the wire when navigating to a web server. In order to get something of a friendly name you have to submit the IP address in the Destination field to DNS and it will return the friendly name.


You're also doing this the wrong way. You were already told what you had to do to the this the correct way and that was a proxy server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900