In this simple tutorial we will see how we can save the result of running the phpinfo () in a text file, as is well known phpinfo () displays all the settings for an installation of PHP-generated through a very detailed page and formatted the same language engine.
Store in a remote page that performs this function is not a good idea, especially for security, better and save the information generated in a text file to be moved immediately locally.
To do this you need is a simple procedure that involves running the following code:
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><?php</span> <? Php</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">ob_start();</span> ob_start ();</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">phpinfo();</span> phpinfo ();</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">file_put_contents('file.txt', ob_get_clean());</span> file_put_contents ('file.txt', ob_get_clean ());</span>