Search code examples
javascriptphpbrowser-history

Is Auto Uploading Your Browsing History To Mysql DB Possible?


Php Geniuses,

Q1. Is there a way I can auto upload my internet browsing history onto my website's mysql db so I don't have to do it manually one by one ? Can php do the job or do I have to look into Javascript ? If php can do it then what php functions would do the job ? Else, which Javascript function ?

Q2. Is there a way I can auto upload my bookmarks onto my website's mysql db so I don't have to do it manually one by one ? Can php do the job or do I have to look into Javascript ? If php can do it then what php functions would do the job ? Else, which Javascript function ?

Few yrs back, before del.icio.us was bought by another company, you could auto upload all your bookmarks to your del.icio.us account so that you can later access all your bookmarks on the web from any computer and you did not need to be standing in-front of your home computer to access your bookmarks that you saved on your home computer. I want to build something like that but I don't want the extraction & uploading limited to bookmarks only. Want to extract & upload both bookmarks & browsing history where one script could be for uploading browsing history and the other script for uploading bookmarks.

MySql database DB Name: links

Tbl Name: bookmarks Columns: id,date_&_time,urls

Tbl Name: browsing_history Columns: id,date_&_time,urls

I am thinking of providing a link on my page that when clicked it extracts all your browsing history and uploads it to my db. I am thinking of providing a link on my page that when clicked it extracts all your bookmarks and uploads it to my db (like del.icio.us used to do in the past before it was sold).

You are aware that, you can access you browsing history by clicking CTRL H. The urls you see in the browsing history list, these must be auto uploaded.

And, you are aware that, you can access you bookmarks by clicking CTRL B. The urls you see in the bookmarks list, these must be auto uploaded.


Solution

  • You can create a browser extension which logs each request made from the browser. You can then post that data, for example as a .har file, to a server.

    Without using an extension you can use PerformanceObserver to observer all requests made from the document, send each entry as JSON to server.