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 generateRandomString($length = 12) { | |
| $characters = '23456789abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ !@#$%^&*()_-'; | |
| $randomString = ''; | |
| for ($i = 0; $i < $length; $i++) { | |
| $randomString .= $characters[rand(0, strlen($characters) - 1)]; | |
| } | |
| return $randomString; | |
| } |
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 | |
| class Foo { | |
| protected $var1; | |
| protected $var2; | |
| /* Get Properties | |
| * | |
| * Get all class properties at once and put it in an array | |
| * | |
| * @return array $class_vars |
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 | |
| class ResumeDownload { | |
| private $file; | |
| private $name; | |
| private $boundary; | |
| private $delay = 0; | |
| private $size = 0; | |
| function __construct($file, $delay = 0) { | |
| if (! is_file($file)) { |
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
| $request->query->get('term'); |
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
| shutdown -s -f -t 60 |
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
| $request->getScheme().'://'.$request->getHttpHost().$request->getBasePath().$request->getPathInfo(); |
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
| D:\webserver>mklink /d d:\webserver\apache\ d:\webserver\apache22 |
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
| DELETE a,b,c | |
| FROM wp_posts a | |
| LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) | |
| LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) | |
| WHERE a.post_type = 'revision' |
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
| IMAGETYPE_UNKNOWN 0 | |
| IMAGETYPE_GIF 1 | |
| IMAGETYPE_JPEG 2 | |
| IMAGETYPE_PNG 3 | |
| IMAGETYPE_SWF 4 | |
| IMAGETYPE_PSD 5 | |
| IMAGETYPE_BMP 6 | |
| IMAGETYPE_TIFF_II 7 | |
| IMAGETYPE_TIFF_MM 8 | |
| IMAGETYPE_JPEG2000 9 |
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
| Content-type: multipart/form-data, boundary={$boundary} | |
| Content-Length: {$contentLength} | |
| --{$boundary} | |
| content-disposition: form-data; name="field1" | |
| {$field1} | |
| --{$boundary} | |
| content-disposition: form-data; name="field2" |