unless the framed page will allow you to run your own scripts on that page, you won't be able to easily do what you describe.
one way around it would be to use a pop-up window instead of a frame.
make sure you include the feature to display bookmarks.
all that would need to be done is:
create a new form tag, method = POST, action=yourPHP page.
add an input to that form.
set the input value=document.body.innerHTML
submit the form.
this must be done using a bookmarklet, or the security limits will kill it.
read up about these methods here
BROWSER STATS [% share]
(2013/12/12) IE7:0.3, IE8:7.5, IE11:4.3, IE9:4.6, IE10:7.8, FF:18, CH:43, SF:5.5, MOBILE:21.5