2019 m. spalio 15 d., antradienis
2019 m. rugpjūčio 27 d., antradienis
detect spamming sript
Pirmiausia, žiūrėti mail log:
1829AB7A07E3: uid=48 from=<aaa@bbb.lt>
Pirmas stulpelis - mail quue id, antras - proceso id, kuris siunčia.
php.ini turi būti nustatyta: mail.add_x_header = On
1829AB7A07E3: uid=48 from=<aaa@bbb.lt>
Pirmas stulpelis - mail quue id, antras - proceso id, kuris siunčia.
php.ini turi būti nustatyta: mail.add_x_header = On
postcat -q <ID> - pagal mail que id pažiūrėti laišką
postcat -q DA5E8647235C | grep X-PHP-Originating-Script
X-PHP-Originating-Script: 45:badmailer.php
The number 45 is the UID, which is the Linux user ID that ran the script
postcat -q DA5E8647235C | grep sasl_username
Resend messages in the queue: postqueue -f
Pastaba: susitvarkus, paleisti postsuper -d ALL
nes kitaip dar tukstanciai padetu laisku gali buti.
Papildomai, iš išorės galima blokuoti SMTP (jungiantis iš servo rašyti localhost):
iptables -A INPUT -p tcp -s localhost --dport 25 -j ACCEPT
iptables -A INPUT -p tcp -s localhost --dport 25 -j ACCEPT
2019 m. balandžio 21 d., sekmadienis
phpexcel, pdf
/*
$objWriter = PHPExcel_IOFactory::createWriter($doc, 'HTML');
$objWriter->writeAllSheets();
//$objWriter->generateStyles(false);
//echo $objWriter->generateSheetData();
//exit;
$objWriter->save('php://output'); exit;
$css = <<<HTML
<style>
.navigation {display:none}
.gridlines td {border:0;}
</style>
HTML;
require_once('class/pdf/pdftk.php');
ob_start();
$objWriter->save('php://output');
$excelOutput = ob_get_clean();
$excelOutput = str_replace('</head>', $css.'</head>' , $excelOutput);
pdftk::html2pdf($excelOutput,'aaa.pdf', 'L', 'I');
exit;
*/
PHPExcel_Settings::setPdfRenderer(PHPExcel_Settings::PDF_RENDERER_MPDF,'../composer/vendor/mpdf/mpdf/');
$objWriter = PHPExcel_IOFactory::createWriter($doc, 'PDF');
$objWriter->writeAllSheets();
header('Content-type:Application/pdf');
header('Content-Disposition: inline;filename="export.pdf"');
$objWriter->save('php://output');
exit;
2019 m. sausio 1 d., antradienis
letsencrypt free sll instalation and usage
https://letsencrypt.org/
https://www.hostinger.com/tutorials/vps/how-to-install-lets-encrypt-ssl-on-vps-running-vebmin-virtualmin#gref
https://helpdesk.ssls.com/hc/en-us/articles/115001610352-How-to-install-a-SSL-certificate-in-Webmin
https://blog.flaunt7.com/how-to-use-lets-encrypt-on-vesta-login-panel/
https://www.hostinger.com/tutorials/vps/how-to-install-lets-encrypt-ssl-on-vps-running-vebmin-virtualmin#gref
https://helpdesk.ssls.com/hc/en-us/articles/115001610352-How-to-install-a-SSL-certificate-in-Webmin
https://blog.flaunt7.com/how-to-use-lets-encrypt-on-vesta-login-panel/
large file resumable file upload in chunks
http://www.resumablejs.com/
https://github.com/ZiTAL/html5-file-upload-chunk
https://github.com/blueimp/jQuery-File-Upload/wiki/Chunked-file-uploads
https://github.com/flowjs/flow-php-server/blob/master/README.md PHP library for handling chunk uploads.
https://github.com/ZiTAL/html5-file-upload-chunk
https://github.com/blueimp/jQuery-File-Upload/wiki/Chunked-file-uploads
https://github.com/flowjs/flow-php-server/blob/master/README.md PHP library for handling chunk uploads.
Užsisakykite:
Pranešimai (Atom)