Langsung ke konten utama

Postingan

Menampilkan postingan dari November, 2022

Batasi Port Keluar yang bikin IP Publik sering kena Blacklist di MikroTik

 /ip firewall filter add action=add-src-to-address-list address-list=smtp-spammers address-list-timeout=none-dynamic chain=forward \     dst-port=25 protocol=tcp add action=drop chain=forward dst-port=25,1443,445,137,139 protocol=tcp add action=drop chain=forward dst-port=445,137-139 protocol=udp

PHP: Generate Number

 <? // Make an empty array $numbers = array(); // Loop while there aren't enough numbers while (count($numbers) < 900) {     $random_number = mt_rand(1000000000, 9999999999);     if (!in_array($random_number, $numbers)) {            // This adds the number to the array         $numbers[] = $random_number;     } } foreach ($numbers as $number) {     echo "331701".$number."\n"; // or <br /> if you are using as part of page. } ?>

Codeigniter LIKE with wildcard (%)

   $this->db->like('title', 'match', 'before');   // Produces: WHERE title LIKE '%match'   $this->db->like('title', 'match', 'after');  // Produces: WHERE title LIKE 'match%'  $this->db->like('title', 'match', 'both');  // Produces: WHERE title LIKE '%match%' source:  - https://stackoverflow.com/questions/16226906/codeigniter-like-with-wildcard  - https://stackoverflow.com/questions/44585478/search-query-in-codeigniter