I'm messing around with a program to track my internet browsing habits and I'm trying to think of the best way to do it. I have some ideas but I'm not sure how feasible they are.
- Somehow hook into firefox. I don't think there's an API that I can hook java into firefox with. I heard something about a firefox java rmi add on that I can access from java but I can't find anything. This would restrict me to firefox, which is fine because I only use firefox.
- Emulate Windows "netstat" somehow. I don't want to call netstat because that limits me to Windows. This would be a last case scenario
- Socket programming. I can set up a ServerSocket to listen on port 80 but not if there is already something using that port, so it doesn't do what I want it to do, listen to what's already going on on port 80.
- Use a packet capture library. This seems like overkill.
Any other ideas?