   Getting Web Pages
  How can I get Web Pages in C++?I mean sb who uses firefox, has an open tab runs my program and returned value is http://www.google.com/index.phpfor example...Or other way, he runs the program and creates a new tab on firefox, types in url bar: "ga" chooses gamedev.net and when presses enter my program returns:http://gamedev.net/How Can This Be Done?   
  Sounds like you want to write a firefox plugin? If you want to support other browsers, you'd need to write a plugin for each browser (And I don't even think it's possible with Internet Explorer).   ;Quote:Original post by DEALOSHow can I get Web Pages in C++?With the CURL library.Quote:Or other way, he runs the program and creates a new tab on firefox, types in url bar: "ga" chooses gamedev.net and when presses enter my program returns:http://gamedev.net/Wait, where does a C++ program come into play here? A plugin for the URL bar in firefox?[Edited by - Hodgman on May 12, 2010 8:57:52 AM];  Well, I do not mean exactly that.Not an Addon.An external application which does that.   ;  Why?  Bookmarks in Firefox already do that.  They have a property called the "keyword".  For instance, I have a bookmark that navigates to "http://www.cplusplus.com/query/search.cgi?q=%s" with the keyword "cpp".  This way, I can enter "cpp iostream" in the address bar and Firefox will take me to "http://www.cplusplus.com/query/search.cgi?q=iostream".  And in your case, you can set up a bookmark with its keyword "ga" and to navigate you to "http://gamedev.net/".Unless you're talking about opening a link from your program to the user's local browser.  In which case, you can use the ShellExecute function:HINSTANCE inst = ShellExecute( 0, L"open", L"http://www.google.com/index.html", 0, 0, 0 );   ;  You've missunderstood.I only want to get the url from the web page which is being viewed at the time asked.   ;  There's no easy way to do that; you have to dig into the Firefox window setup, try and find the address bar control, and retrieve the text from it. You'd use Win32 API functions to do that.   ;  Well, that is what I am asking.I was just wondering if it could be done by sniffing the HTTP port in a way.   ;Quote:Original post by DEALOSWell, that is what I am asking.I was just wondering if it could be done by sniffing the HTTP port in a way.You could write a packet sniffer to record outgoing requests to port 80, and then parse the HTTP header, yes - but that'll only work if the user actually loads a web page, won't work for secure HTTP (I don't think at least), and is extremely intrusive (I.e. it's unlikely to work unless you're logged in as Administrator).What exactly are you trying to achieve? There may be a better way to go about it.   ;  Something like a parental control program.If it finds out non-allowed url runs tskill -firefox.exe continously for 10 minutes.Is it possible to do it by getting the history  of firefox?   