/ Published in: PHP
It compress an static html page using php and output the response using document.write giving us a nice and ofuscated output check out your page source code after view it ;)
Expand |
Embed | Plain Text
<?php $signature = 'My signature'; //make javascript handle our output $script = sprintf('(function(e){var w="",s="",d = document; while((s=e.pop())!=undefined) w+=s; d["write"](w); })(%s);' ,json_encode( ))); $ch = curl_init('http://closure-compiler.appspot.com/compile'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, 'output_info=compiled_code&output_format=text&compilation_level=ADVANCED_OPTIMIZATIONS&js_code=' . urlencode($script)); $g_output = curl_exec($ch); curl_close($ch); echo $jsContent; ?>
You need to login to post a comment.
