get url from mozilla

closed account (28poGNh0)
Hello everyone

Does anyone know a function/way to get the url from mozilla navigator
for expamle :

string getUrl()
{
// codes
return strURL;
}

output : http://www.cplusplus.com/

Thanks for reading
Last edited on
No function.
You can build Mozilla from source code, and whenever the url changes update it into a txt file. Then you can create a program that checks that txt file in real time if it changes.
What is this for? If you're creating a plugin then there's a whole library for interfacing with the browser that you can use, but if you're creating a completely separate application then interfacing with the browser will be trickier and rather hackish.
closed account (28poGNh0)
Thanks a lot @poteto @ModShop

What I am trying to do is : to grab all the websites that I visited during my net surfing. And I want results like this

14:14 15/12/1014 - http://www.cplusplus.com/forum/myposts.cgi
14:15 15/12/1014 - http://www.cplusplus.com/forum/general/151038/

Thats the task of the program

also you're putting a lot of good ideas that I would to ask some questions about
it later

any new infos appreciated thanks again
Why not just export history as text file? Write addon which will read history, format it as you need and dump it in a file.
closed account (28poGNh0)
Thanks @MiiNiPaa

How can do that ? How to write an addon?
Last edited on
I suggest to look at https://developer.mozilla.org/
Alo search for avaliable addons in open source, study them and look how are they made.
@ OP: The user history will be in "%AppData%\mozilla\Firefox\Profiles\*.default\places.sqlite" . If you couldn't tell, this is an SQLite document so check this out: http://www.sqlite.org/index.html . That to me would be the most direct route to accomplish what you are describing in C++. Don't get me wrong XPCOM and XPIDL look interesting, and they are on my list of things to bang my head on a wall over, but IPC really isn't a beginner topic. XPCOM: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings
. Other then that, development for Mozilla projects tend to favor JavaScripts.
Topic archived. No new replies allowed.