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 | |
| //create random hash, please notice $6$ as first chars in salt string | |
| $salt = "$6$5e2de398074f9213"; | |
| $hash = crypt('pswt1', $salt); | |
| echo $hash; | |
| //mariaDB compatible code: select ENCRYPT('pswt1', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))); | |
| echo "<hr>"; |
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 | |
| $deviceToken = $_POST['dt']; | |
| $body = $_POST['b']; | |
| if (empty($deviceToken)){ | |
| die ("nothing to do, no device. exit"); | |
| } | |
| #API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', '' ); | |
| #prep the bundle |
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 | |
| /** | |
| * The __halt_compiler() function will stop the PHP compiler when called. | |
| * You can then use the __COMPILER_HALT_OFFSET__ constant to grab the contents of the PHP file after the halt. | |
| * In this example a PHP template is stored after the halt, to allow simple separation of logic from templating. | |
| * The template is stored in a temporary file so it can be included and parsed. | |
| * | |
| * See: https://github.com/bobthecow/mustache.php/blob/dev/src/Mustache/Loader/InlineLoader.php | |
| * http://php.net/manual/en/function.halt-compiler.php | |
| */ |
NewerOlder