This file contains hidden or 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 | |
| function keygen($length='40'){ | |
| $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
| $size = strlen($chars); | |
| for($i = 0; $i < $length; $i++): | |
| $str .= $chars[ rand( 0, $size - 1 ) ]; | |
| endfor; | |
| return $str; | |
| } |
This file contains hidden or 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 | |
| function hasher($password, $salt){ | |
| $result = base64_encode(hash('md5', $password.$salt)); | |
| $result = substr($result, 5, -5); | |
| return strrev($result); | |
| } | |
| //Example | |
| print hasher('myPassword', time()); | |
| ?> |
This file contains hidden or 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
| <!--(?!<!)[^\[>].*?--> |
This file contains hidden or 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 | |
| $codes = Array( | |
| 100 => 'Continue', | |
| 101 => 'Switching Protocols', | |
| 200 => 'OK', | |
| 201 => 'Created', | |
| 202 => 'Accepted', | |
| 203 => 'Non-Authoritative Information', | |
| 204 => 'No Content', | |
| 205 => 'Reset Content', |
This file contains hidden or 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 | |
| function seoName($title) { | |
| return preg_replace('/[^a-z0-9_-]/i', '', strtolower(str_replace(' ', '-', trim($title)))); | |
| } | |
| ?> |
This file contains hidden or 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 | |
| /** | |
| * No Image Options: | |
| * 404 - do not load any image if none is associated with the email hash, instead return an HTTP 404 (File Not Found) response | |
| * mm - (mystery-man) Simple, cartoon-style silhouetted outline of a person | |
| * identicon - Geometric pattern based on an email hash | |
| * monsterid - Generated 'monster' with different colors, faces, etc | |
| * wavatar - Fenerated faces with differing features and backgrounds | |
| * retro - 8-bit arcade-style pixelated faces |
This file contains hidden or 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 | |
| $bad = array_merge(array_map('chr', range(0,31)), array("<", ">", ":", '"', "/", "\\", "|", "?", "*", " ")); | |
| $result = str_replace($bad, "-", $filename); | |
| ?> |
This file contains hidden or 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
| wget -nc -nH -E -r -k -P /home/you/example.com -np http://example.com/ |
This file contains hidden or 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 | |
| $i=0; | |
| while($c = $db->getNextSet(true)): | |
| print '<li class="'.($i++%2==0 ? 'odd' : 'even').'">Zebras yo!</li>'; | |
| endwhile; | |
| ?> |