Tag Archives: PHP

Prohibit execution of PHP scripts inside include directory

Create a PHP file /** * prepend_goto_index.php */ header(‘Location: http://’ . $_SERVER['HTTP_HOST']); Inside the include directory, create .htaccess file php_value auto_prepend_file prepend_goto_index.php

Posted in PHP | Tagged , | Leave a comment

Disable PHP in directory

In .htaccess php_flag engine off

Posted in Apache2, PHP | Tagged , | Leave a comment

How to create reverse traceroute page on your website using PHP

<?php $result = exec(‘traceroute ‘ . $_SERVER["REMOTE_ADDR"], $lines); echo ‘<h1>Your IP is ‘ . $_SERVER["REMOTE_ADDR"] . ‘</h1>’; echo ‘<pre>’; foreach ($lines as $n => $line) { if ($n) echo ‘<br />’; echo $line; } echo ‘</pre>’; echo ‘<p>-end-</p>’; Here’s how … Continue reading

Posted in Linux Administration, PHP, Programming | Tagged , , | Leave a comment