I'm trying to enable screenshots of the page a logged in user is currently on. I've placed a button that needs to:
- read in the content of the referring page
- save it to a file
- render that file as a PDF
- redirect back to the referring page
The problem I've run into is that users are logged in and on pages that are very specific to them. I can't grab the page via CURL with generic credentials because the screenshot won't be applicable, and I don't have the user's credentials.
How can I read in the contents of the current/referrering page with PHP without access to the users credentials? I've tried file_get_contents
which was not working either.