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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
| <title>Firebase Example</title> | |
| <style> |
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 | |
| $files = array_merge(glob("../lib/*.css"), glob("../lib/*.js")); | |
| $files = array_combine($files, array_map("filemtime", $files)); | |
| arsort($files); | |
| $latest_file = key($files); | |
| $time = filemtime($latest_file); | |
| echo $time; //int 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
| <?php | |
| /** | |
| * shortens the supplied text after last word | |
| * @param string $string | |
| * @param int $max_length | |
| * @param string $end_substitute text to append, for example "..." | |
| * @param boolean $html_linebreaks if LF entities should be converted to <br /> | |
| * @return string | |
| */ |
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
| <video id="background-video" loop muted controls preload="none" poster="https://assets.codepen.io/6093409/river.jpg"> | |
| <source src="https://assets.codepen.io/6093409/river.mp4" type="video/mp4"> | |
| </video> |
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
| <label id="minutes">00</label>:<label id="seconds">00</label> | |
| <script> | |
| //https://stackoverflow.com/a/5517836 | |
| var minutesLabel = document.getElementById("minutes"); | |
| var secondsLabel = document.getElementById("seconds"); | |
| var totalSeconds = 0; | |
| setInterval(setTime, 1000); |
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
| <html> | |
| <body> | |
| <audio id="myAudio" src="FurElise.mp3" preload="metadata"></audio> | |
| <input type="button" value="sound" onclick="togglePlay1()" /> | |
| <script> | |
| //FurElise.mp3 |
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 | |
| //https://toplist.vn/top-list/hot-girl-viet-dep-nhat-tren-instagram-20537.htm | |
| $curl = curl_init(); | |
| curl_setopt_array($curl, array( | |
| CURLOPT_URL => 'https://i.instagram.com/api/v1/users/web_profile_info/?username=linggka109', | |
| CURLOPT_RETURNTRANSFER => true, | |
| CURLOPT_ENCODING => '', | |
| CURLOPT_MAXREDIRS => 10, |
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 hash string | |
| https://www.php.net/manual/en/function.hash.php | |
| <?php | |
| $str = "hello"; | |
| $checksum = crc32($str); | |
| echo $checksum.'<br>'; | |
| echo hash("crc32b", $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 | |
| class Instagram{ | |
| private $data = []; | |
| private $user = ''; | |
| private $rs_request = null; | |
| private $minus_cache = 20;//minus | |
| private $folder_thump = 'thump'; | |
| private $save_thump_320 = '320'; | |
| public function __contructor(){ |
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
| echo generateRandomString(7); | |
| echo '<br>';echo '<br>';echo '<br>';echo '<br>'; | |
| function generateRandomString($length = 6){ | |
| $chars = "abcdfghjkmnpqrstvwxyz|ABCDFGHJKLMNPQRSTVWXYZ|0123456789"; | |
| $sets = explode('|', $chars); | |
| $all = ''; | |
| $randString = ''; |