javascript - Save source code as rendered for client as .txt file -


i'm trying save source code of webpage rendered client/user. not code stored on server, looks after scripts have executed client-side. (if makes sense). taking source code if client open source code viewer, , save code using php .txt file on server. i'm thinking javascript/html5? (and of course php)

basically want cache html output. can ob_ functions in php:

<?php ob_start();  //start buffering output  // html , echo statements  $cachefile = //wherever want save  $fp = fopen($cachefile, 'w'); fwrite($fp, ob_get_contents()); /* save buffer cache file */ fclose($fp);  ob_end_flush(); /* send buffer browser */ ?> 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -