So, I really don't know where to begin with this. I feel like it's possible with php, although it's probably past my current scope of knowledge. (It may not seem like a php question, but I promise it is 😉)
Original scenario:
Let's say I have an html form with 3 or 4 values. The form goes to a remote server, has some processing done on it, then the remote server relocates the browser back to my server (via one of the hidden fields on the inital form), and loads up a page. This page, essentially, has one real action:
script language="javascript" src="remoteserver/processoutput.php"
The javascript that is called has within in a number of document.write() statements in it.
So, in a nutshell; You send data to another website, it 'formats' it for you, sends your browser back to your site, then a page on your site queries a javascript on the remote server to output the results.
It seems a bit complicated, but it's for the external site to syndicate their formatting services for use on other sites.
So, my dilemma is this: I would like to capture the output churned out by the javascript script that's loaded in the final page. I'm dumping the data into a dB, but in a more general sense, I just want to capture the results.
I have a kludgy solution at the moment, but it involves some nasty javascript that I'd rather do without.
Ideally, I'd like to be able to, once I receive the data from the initial form:
1. Fake a HTTP post to the remote server (I know how to do this)
2. Then, somehow have php catch the redirection by the remote server to my site, and then, knowing that the processing is done, call upon that last script on my page, and strip out the output from it.
Sounds complicated, but I hope it made sense. If you need any more elaboration, please ask.
Thanks in advance!