Screen size

ERROR PHP

ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);

MOJE IP :216.73.217.12

if(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] == '216.73.217.12') { dd($data); }

RESTART MYSQL

sudo /etc/init.d/mysql restart

UWANIE ZNACZNIKÓW CSS Z KODU HTML

Pierwsza linia w "find regex", druga nizej

<(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdi|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|main|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|svg|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr)[^>]+ <$1

ZNAJDŹ TEKST W PLIKU I USUŃ

find ./ -type f -readable -writable -exec sed -i "s/old-text/new-text/g" {} ;

DUMP BAZY Z WYKLUCZENIEM 2 TABEL

mysqldump -u user_name -p -h host_name db_name table1 table2 --ignore-table={db_name.table3,db_name.table4 }> dump.sql

WYSZUKIWANIE DUBLI W TABELI

//wyszukaj duble SELECT *, GROUP_CONCAT(id), count(*) as i FROM `table` WHERE 1 GROUP BY col having count(*) > 1 //wyszukaj duble ale pomiń pierwszy SELECT SUBSTRING_INDEX(GROUP_CONCAT(id ORDER BY id DESC), ',', -COUNT(*) + 1) AS ids FROM `table` WHERE 1 GROUP BY col HAVING count(*)>1;

Google reCaptcha php

class PcodeCaptcha { private $pcodecaptcha = [ 'status' => true, 'script' => '< script src="https://www.google.com/recaptcha/api.js" async defer>< /script>', 'code' => "", 'sitekey' => "", 'secretkey' => "", ]; private static $instance = null; public static function gi() { if (self::$instance === null) { self::$instance = new self; } return self::$instance; } public function getStatus() { return $this->pcodecaptcha['status']; } public function pcodecaptchaConfig() { if ($this->pcodecaptcha['sitekey']) { $this->pcodecaptcha['code'] = '
'; } return $this->pcodecaptcha; } public function validateCaptcha($response = '', $remote_addr = '') { $googleVerificationUrl = 'https://www.google.com/recaptcha/api/siteverify'; $ch = curl_init(); curl_setopt_array($ch, [ CURLOPT_URL => $googleVerificationUrl, CURLOPT_POST => true, CURLOPT_POSTFIELDS => [ 'secret' => $this->pcodecaptcha['secretkey'], 'response' => $response, 'remoteip' => $remote_addr, ], CURLOPT_RETURNTRANSFER => true, ]); $output = curl_exec($ch); curl_close($ch); $googleResponseObj = json_decode($output); if ($googleResponseObj->success) { return false; } else { return 'Błąd weryfikacji reCAPTCHA'; } } }