I'm try to figure out if there is a way to pass the page source across domains using javascript or another method each time a page is loaded? I know in javascript I can output the page source in to variables using the code below, but how would I go about passing it over to a different domain?
var head_src = document.head.innerHTML;
var body_src = document.body.innerHTML;
Can anyone point me in to the right direction? It seems every method I've tried or researched doesn't work correctly or has a lot of issues and I'm running out of ideas. Thanks in advance.
EDIT MORE INFO BELOW
Imagine that I have two websites on different servers. Website A is where the source data needs to be sent to and Website B is a website that users browse and I want to collect the source of each page they view and post it to Website A. I have access to both servers and I was hoping that I could add JS code on Website B that will pass the data over.