This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://vileworks.com/projects/limit.php | |
// This page can only be accessed 5 times in any 10 second interval. | |
function limit_requests($nr=5,$t=10) { | |
if (!session_id()) { | |
start_session_based_on_ip(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function echoFromFile($fileName, $run, $data) { | |
if (!is_dir('temp')) { | |
mkdir('temp'); | |
} | |
file_put_contents($fileName, $data); | |
if ($run===1) { | |
include($fileName); | |
} | |
else { | |
readfile($fileName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^([^/]+)/$ $1.php | |
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ | |
RewriteRule (.*)$ /$1/ [R=301,L] |