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

css - I want to align grid in center -

python - SWIG function not printing output -

Contact Form PHP Email Script -