Results 1 to 20 of 20

Thread: [Help]Get HTTP Links

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    101

    [Help]Get HTTP Links

    Hi all i got one qetion how can example listen on port 80 using winsock and
    example someone has internet explorer open and is visiting a page how can i now capture the link and add it to a textbox or listbox i hope you understand what i mean my english is pretty poor

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [Help]Get HTTP Links

    If you are listening on port 80 then you are kind of doing like a web server. Someone would have to know your external IP and connect to your wanna-be web server. If that happens then you would know that persons IP by querrying your socket's remote IP.

    As far as someone visting a page on some other site you can't capture the link as you will have no awareness of such an event.

    I'm just speculating on what you want but I really don't know for sure what you are trying to get at.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    101

    Re: [Help]Get HTTP Links

    i explain what im wanna to to is a app with a winsock control and a listbox
    the winsock control should listen on port 80 because http request use port 80 now for example someone open up the internet explorer or maybe firefox and enters a link and goes to the site the link that he send the http request too should appear in the listbox

  4. #4
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [Help]Get HTTP Links

    OK, you are saying the same thing you said the first time so my reply is the same. Nothing is going to happen just because your Winsock is listening on port 80.

    Exactly what do you mean by enters a link? What link is this? Is it a link to your site? A link to your app? How does someone get this link?

    Exactly what do you mean by the site? Is this your own site and you have control over it or is it just any old site?

  5. #5
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [Help]Get HTTP Links

    Let me see if I can explain it this way.

    You have a application with a Winsock Control. The Winsock is listening on Port 80. Now this sounds like you are trying to make a Web Site server application.

    OK, let's say you are. Now you need someone to connect to your site. So, someone has to know what your address is. Let's say that I know what it is. So I open my IE and type in http://nnn.nnn.nnn.nnn/index.html. Now nnn.nnn.nnn.nnn is the external address of your PC where your application is running. Now your application gets a connection from my browser. So, in your Winsock1_ConnectionRequest event you accept my request and then my browser get the OK from your application so it now will send your application the HTTP request headers which is a request to get your index.html page. So, in your Winsock1_DataArrival event your program will recieve the HTTP header my browser sent and from there you can display them in your textbox or your listbox.

    Is this what you are wanting? If not then your program will do nothing at all.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    101

    Re: [Help]Get HTTP Links

    :H all i want is that my app gets every site that is visiting like a monitor every not like reading any bookmark files i want that it is working in the background and getting all web links typped in from anyuser and adds it to a listbox maybe you understand me more sorry for my bad english

  7. #7
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [Help]Get HTTP Links

    Sorry, I cannot understand what you want exactly but I don't think you will be able to do it with your application. Your application is only good if other people connect to it. You cannot use it like a monitor.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    101

    Re: [Help]Get HTTP Links

    Mmmm sad :S

  9. #9
    Lively Member
    Join Date
    Jan 2009
    Posts
    90

    Re: [Help]Get HTTP Links

    I think he wants every site he goes to, to go through his application, like a tunnel/proxy, whatever, so he can see all sites that are visited.

    You could, make a proxy server, which would work. You would have to change the user's proxy settings for IE via registry or have them do it manually.

    Another possibility is by modifying the Windows HOSTS file. I'm not sure if this would work for your situation, but you can read on it:
    http://en.wikipedia.org/wiki/Hosts_file#Redirecting

    If you decide to make it a proxy server, there are some examples here.

    And if you want to change the proxy settings programatically, you can try this:
    http://www.pscode.com/vb/scripts/Sho...58695&lngWId=1

    Just set the user's proxy server to your computer's IP (127.0.0.1 would also work) and port 80, or whatever port your Winsock is using (the standard port for proxy servers seems to be 8080).

    Then, on the Winsock_DataArrival() event, you can look at the "Host: " field in the HTTP header which will contain the domain name that they are going to.

    To get the full URL they are visiting, you would combine that Host field with the GET /request_here.php part which is at the very beginning of the data.

  10. #10
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [Help]Get HTTP Links

    Perhaps you are correct here but what gets me is his way of describing it. Like when he says getting all web links typped in from any user. Now it's that any user that gets me. Like it's someone else and also when he says someone open up the internet explorer or maybe firefox and enters a link and goes to the site. Here it's the someone meaning not him or the part ...goes to the site like it's someone else going to the site whatever that is.

    Well if you can figure what he means then great but I sure can't make heads or tails of it.

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    101

    Re: [Help]Get HTTP Links

    Daniel Elkins thats excualy what i want that all site goes to my app and jmsrickland sorry :H i know my english is horrible

  12. #12
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [Help]Get HTTP Links

    Sorry hresha that I wasn't able to understand your request but at least Daniel did so I hope his post put you on the right path the resolve your issue.

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    101

    Re: [Help]Get HTTP Links

    Quote Originally Posted by jmsrickland
    Sorry hresha that I wasn't able to understand your request but at least Daniel did so I hope his post put you on the right path the resolve your issue.
    Nth bro thx for trying to help me yeah i guess he putted me in the right direction hehe

  14. #14
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: [Help]Get HTTP Links

    Can't you just retrieve the History for the IE?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  15. #15
    Lively Member
    Join Date
    Jan 2009
    Posts
    90

    Re: [Help]Get HTTP Links

    Try & see if you can get it to work...shouldn't be too hard. But if you need help, post here and attach your project.

  16. #16
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [Help]Get HTTP Links

    Could this be a sort of a packet sniffer program you want to make?

  17. #17
    Lively Member
    Join Date
    Jan 2009
    Posts
    90

    Re: [Help]Get HTTP Links

    Quote Originally Posted by dee-u
    Can't you just retrieve the History for the IE?
    That would work also but if it's disabled in IE then it won't.

  18. #18

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    101

    Re: [Help]Get HTTP Links

    Quote Originally Posted by jmsrickland
    Could this be a sort of a packet sniffer program you want to make?
    No packet sniffing if i would want to build a packet sniffing software i had to program a raw socket

  19. #19
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [Help]Get HTTP Links

    Quote Originally Posted by kresha7
    No packet sniffing if i would want to build a packet sniffing software i had to program a raw socket
    That's why is said "...sort of a packet sniffer...". I knew it wasn't a full blown sniffer but perhaps a sniffer-like program for HTTP conections only.

  20. #20

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Posts
    101

    Re: [Help]Get HTTP Links

    you can call it like that it should listen for Outgoing HTTP Connection and List them in a listbox that is what im trying to do

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width