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 | |
| $dir = opendir ("./mails"); | |
| while ( $file = readdir ($dir)) { | |
| if (( $file != ".") && ($file != "..")) { | |
| system('sendmail -t < ./mails/'.$file); | |
| unlink('./mails/'.$file); | |
| echo "$file\n"; | |
| } | |
| } | |
| closedir ($dir); |
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
| SELECT | |
| `sights_lang`.`name`, | |
| `sights_lang`.`address`, | |
| `sights`.`category_id`, | |
| `sights_categories_lang`.`categoryName`, | |
| `sights`.`latitude`, | |
| `sights`.`longitude`, | |
| `sights`.`sights_id` | |
| FROM `partner_hotels`.`sights_lang` | |
| JOIN `partner_hotels`.`sights` |
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 | |
| $params = $_SERVER['argv']; | |
| if (!$params[1]) | |
| die("Enter user name...\n"); | |
| $link = mysql_connect('IP', 'UserName', 'Pwd'); | |
| if (!$link) { | |
| die('Could not connect: ' . mysql_error()); | |
| } | |
| echo "Connected successfully\n"; |
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
| select INET_ATON('94.27.106.191') => 1578855103 | |
| select INET_NTOA(1578855103) => 94.27.106.191 |
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
| $clearArr = array_diff($clearArr, array('')); | |
| // 500 000 array_diff => 0.21610689163208 | |
| public static function removeEmpty($var) { | |
| return (!empty($var)); | |
| } | |
| $clearArr = array_filter($clearArr, "removeEmpty"); | |
| // 500 000 removeEmpty => 0.067395925521851 |
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 c, t | |
| FROM crm_calls c | |
| LEFT JOIN crm_tickets t on t.call_id=c.id | |
| WHERE c.last_main_ticket_type_id=0 |
NewerOlder