-
26 ЯНВ 20170
-
25 ЯНВ 20170
-
24 ЯНВ 20170
Orbixx/Obfuscalp - находит и удаляет подозрительный / вредоносный код в PHP
php find.php /path/to/a/bunch/of/php/sites > infected.txt ... Processed 3950000 files, found 30 Processed 3960000 files, found 30 Processed 3970000 files, found 30 php remove.php infected.txt ... Processing file 28 of 30 (%93.33) Processing file 29 of 30 (%96.66) Processing file 30 of 30 (%100)
https://github.com/Orbixx/Obfuscalp -
24 ЯНВ 20170
-
09 ЯНВ 20170
whiteoctober/Pagerfanta - скрипт пагинации php
Пример<?php use Pagerfanta\Adapter\ArrayAdapter; use Pagerfanta\Pagerfanta; $adapter = new ArrayAdapter($array); $pagerfanta = new Pagerfanta($adapter); $pagerfanta->setMaxPerPage($maxPerPage); // 10 by default $maxPerPage = $pagerfanta->getMaxPerPage(); $pagerfanta->setCurrentPage($currentPage); // 1 by default $currentPage = $pagerfanta->getCurrentPage(); $nbResults = $pagerfanta->getNbResults(); $currentPageResults = $pagerfanta->getCurrentPageResults(); $pagerfanta->getNbPages(); $pagerfanta->haveToPaginate(); // whether the number of results if higher than the max per page $pagerfanta->hasPreviousPage(); $pagerfanta->getPreviousPage(); $pagerfanta->hasNextPage(); $pagerfanta->getNextPage();
https://github.com/whiteoctober/Pagerfanta -
06 ЯНВ 20170
willdurand/nmap - php обертка для nmap
Пример$nmap ->enableOsDetection() ->scan([ 'williamdurand.fr' ]); $nmap ->enableServiceInfo() ->scan([ 'williamdurand.fr' ]); // Fluent interface! $nmap ->enableOsDetection() ->enableServiceInfo() ->scan([ 'williamdurand.fr' ]);
https://github.com/willdurand/nmap -
05 ЯНВ 20170
valitron - php библиотека валидации без зависимостей
Пример$v = new Valitron\Validator(array('name' => 'Chester Tester')); $v->rule('required', 'name'); if($v->validate()) { echo "Yay! We're all good!"; } else { // Errors print_r($v->errors()); }
https://github.com/vlucas/valitron -
04 ЯНВ 20170
brandonsavage/Upload - скрипт загрузки файлов с валидацией
Пример<?php $storage = new \Upload\Storage\FileSystem('/path/to/directory'); $file = new \Upload\File('foo', $storage); // Optionally you can rename the file on upload $new_filename = uniqid(); $file->setName($new_filename); // Validate file upload // MimeType List => http://www.iana.org/assignments/media-types/media-types.xhtml $file->addValidations(array( // Ensure file is of type "image/png" new \Upload\Validation\Mimetype('image/png'), //You can also add multi mimetype validation //new \Upload\Validation\Mimetype(array('image/png', 'image/gif')) // Ensure file is no larger than 5M (use "B", "K", M", or "G") new \Upload\Validation\Size('5M') )); // Access data about the file that has been uploaded $data = array( 'name' => $file->getNameWithExtension(), 'extension' => $file->getExtension(), 'mime' => $file->getMimetype(), 'size' => $file->getSize(), 'md5' => $file->getMd5(), 'dimensions' => $file->getDimensions() ); // Try to upload file try { // Success! $file->upload(); } catch (\Exception $e) { // Fail! $errors = $file->getErrors(); }
https://github.com/brandonsavage/Upload
Категории:
Оставить на заметку в: