Thread: Internet Browser Handling

  1. #1
    Registered User
    Join Date
    May 2008
    Location
    Australia
    Posts
    230

    Internet Browser Handling

    Hi, basically this is my goal:

    Writing a program that can find certain elements and objects in a browser (either Firefox or Internet Explorer, the latter being preferred) such as links, and images, etc. Basically I need to be able to pin-point the exact location of the certain objects I want to gather information on, and if they're links, the underlying link.

    So basically, I need a way of dynamically searching for pictures and links in the browser window. I could parse the HTML but that doesn't reveal the location of the object in the browser. The only thing I could really think of was maybe injecting a DLL into the browsers process and hooking all the calls it makes (or something to that effect) and possibly process the data it sends to the functions that draw the images into the browser window.

    Another possibility I thought of was making my own little browser for this specific application, and it just strips the images and links and places them in my custom browser window so that it's the only data displayed.

    ANOTHER possibility I thought of was search for the pixels, but that doesn't seem like a very elegant approach due to the fact that the browser may be customised, the pixels may be out of sight, the other pixels on the site may interfere, etc.

    I'm looking forward to your ideas and what you think the best approach would be! If possible please give a few examples or maybe some functions to check out as well.

    Regards!
    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    The "SIMPLE" solution would probably still involve parsing HTML unless you can produce some sort of plugin that knows what the browser is actually doing.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    May 2008
    Location
    Australia
    Posts
    230
    Quote Originally Posted by matsp View Post
    The "SIMPLE" solution would probably still involve parsing HTML unless you can produce some sort of plugin that knows what the browser is actually doing.

    --
    Mats
    That may be the case, but I don't see how you can get locations of objects just by parsing the HTML :O For starters, is that not browser dependent?
    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by pobri19 View Post
    That may be the case, but I don't see how you can get locations of objects just by parsing the HTML :O For starters, is that not browser dependent?
    It probably is somewhat dependant on the browser, but it is not ONLY browser that matters. Screen resolution/window-size will affect it, as will "history bar" or some such.

    Why do you (feel that you) need to know the location of things on the screen? What difference does it make?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    May 2008
    Location
    Australia
    Posts
    230
    Because I'm working on a website "skeleton" type of project. I don't really want to get into it too much though, I don't want people copying my original idea *yet* ahah. But I definitely need to know the locations Or at least be able to pass handles to them in some fashion.
    Last edited by pobri19; 04-03-2009 at 03:32 AM.
    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.

  6. #6
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,058

  7. #7
    Registered User
    Join Date
    Nov 2002
    Posts
    319
    why dont you use GET and POST with winsock , even tho you dont need the browser open it gets all the html of the site and forms and url links

  8. #8
    Registered User
    Join Date
    May 2008
    Location
    Australia
    Posts
    230
    Quote Originally Posted by Anddos View Post
    why dont you use GET and POST with winsock , even tho you dont need the browser open it gets all the html of the site and forms and url links
    That doesn't help me. As I said before, I need the location of the objects. I think Browser Helper Objects may be the way to go (that is if they support the ability to get locations or handles of certain objects, which by the sounds of it they do).

    Does anyone know if they also support the ability to change Internet Explorer program settings and does anyone else have anything to say about them?

    Thanks for the link matsp.
    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.

  9. #9
    Registered User
    Join Date
    Nov 2002
    Posts
    319
    change Internet Explorer program settings

    you can do most of that from the registry

  10. #10
    Registered User
    Join Date
    May 2008
    Location
    Australia
    Posts
    230
    Quote Originally Posted by vsharma View Post
    his is a 32x32 icon. Program compiles without any errors. Complete code is available upon request. Please offer any suggestions if you see that I am missing something.
    __________________

    * "Problem Solving C++, The Object of Programming" -Walter Savitch
    * "Data Structures and Other Objects using C++" -Walter Savitch
    * "Assembly Language for Intel-Based Computers" -Kip Irvine
    * "Programming Windows, 5th edition" -Charles Petzold
    * "Visual C++ MFC Programming by Example" -John E. Swanke
    * "Network Programming Windows" -Jones/Ohlund
    * "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    * "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel
    ___________
    Acai Berry Juice Berries Oprah
    build cheap gaming computer
    What? No idea what you're talking about lol. But if you're saying you have code that does this I request it!
    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. event handling is serialized in MS Visual Studio C++ 2005 ??
    By mynickmynick in forum Windows Programming
    Replies: 3
    Last Post: 08-07-2008, 04:47 AM
  2. Getting Default Browser and Running It
    By Driver in forum Windows Programming
    Replies: 4
    Last Post: 10-22-2004, 02:08 PM
  3. Internet Problems
    By SirCrono6 in forum Tech Board
    Replies: 3
    Last Post: 04-26-2004, 09:47 PM
  4. Internet Browser
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 46
    Last Post: 11-30-2001, 06:27 PM