J'ai besoin d'intimité. Non pas parce que mes actions sont douteuses, mais parce que votre jugement et vos intentions le sont.
5163 links
Régler le problème du templating en php en séparant vraiment le php et le HTML, à la manière du css. Brillant !
Le dépôt du projet sur github : https://github.com/Level-2/Transphporm
Librairie de manipulation d'images en php
Livres pour développeurs.
Via plein de monde
The OWASP Zed Attack Proxy (ZAP) is one of the world’s most popular free security tools and is actively maintained by hundreds of international volunteers*. It can help you automatically find security vulnerabilities in your web applications while you are developing and testing your applications. Its also a great tool for experienced pentesters to use for manual security testing.
Many PHP developers utilize email in their code. The only PHP function that supports this is the mail() function. However, it does not provide any assistance for making use of popular features such as HTML-based emails and attachments.
Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules - the vast majority of code that you'll find online that uses the mail() function directly is just plain wrong! Please don't be tempted to do it yourself - if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own - try SwiftMailer, Zend_Mail, eZcomponents etc.
The PHP mail() function usually sends via a local mail server, typically fronted by a sendmail binary on Linux, BSD and OS X platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server.
This is a library for encrypting data with a key or password in PHP. It requires PHP 5.4 or newer. The current version is v2.0.0, which is expected to remain stable and supported by its authors with security and bugfixes until at least January 1st, 2019.
The library is a joint effort between Taylor Hornby and Scott Arciszewski as well as numerous open-source contributors.
What separates this library from other PHP encryption libraries is, firstly, that it is secure. The authors used to encounter insecure PHP encryption code on a daily basis, so they created this library to bring more security to the ecosystem. Secondly, this library is "difficult to misuse." Like libsodium, its API is designed to be easy to use in a secure way and hard to use in an insecure way.
Peut-être utile pour BoZoN : Bronco, si tu me lis...
Base64 encoding of large files.
Base64 encoding converts triples of eight-bit symbols into quadruples of six-bit symbols. Reading the input file in chunks that are a multiple of three bytes in length results in a chunk that can be encoded independently of the rest of the input file. MIME additionally enforces a line length of 76 characters plus the CRLF. 76 characters is enough for 19 quadruples of six-bit symbols thus representing 19 triples of eight-bit symbols. Reading 57 eight-bit symbols provides exactly enough data for a complete MIME-formatted line. Finally, PHP's default buffer size is 8192 bytes - enough for 143 MIME lines' worth of input.
So if you read from the input file in chunks of 8151 (=57*143) bytes you will get (up to) 8151 eight-bit symbols, which encode as exactly 10868 six-bit symbols, which then wrap to exactly 143 MIME-formatted lines. There is no need to retain left-over symbols (either six- or eight-bit) from one chunk to the next. Just read a chunk, encode it, write it out, and go on to the next chunk. Obviously the last chunk will probably be shorter, but encoding it is still independent of the rest.
while(!feof($input_file))
{
$plain = fread($input_file, 57 * 143);
$encoded = base64_encode($plain);
$encoded = chunk_split($encoded, 76, "\r\n");
fwrite($output_file, $encoded);
}
Conversely, each 76-character MIME-formatted line (not counting the trailing CRLF) contains exactly enough data for 57 bytes of output without needing to retain leftover bits that need prepending to the next line. What that means is that each line can be decoded independently of the others, and the decoded chunks can then be concatenated together or written out sequentially. However, this does make the assumption that the encoded data really is MIME-formatted; without that assurance it is necessary to accept that the base64 data won't be so conveniently arranged.
Librairie pour pouvoir utiliser les clefs USB U2F (pour l'authentification à 2 facteurs).
Des trucs à savoir pour développer en PHP
Petits rappels qui font du bien.
Bronco, si tu me lis, va y faire un tour pour la V3 de BoZon
Qu'est ce que Jin ?
Jin est un framework PHP léger construit comme une boite à outils. L'objectif est de répondre à des problématiques de développement spécifiques en offrant des solutions intégrables dans des environnements CMS Open source diversifiés. L'idée est de limiter la multi-spécialisation en offrant une solution transversale et modulable.
Quelles sont les possibilités offertes ?
Base de données
Connexion BDD (MySql, Sqlite3, PostgreSQL et connecteurs spécifiques CMS) (jin/db/*)
Connexion BDD NoSql (MongoDB)
Requêtage simplifié en bases de données (jin/query/Query)
Effectuer des requêtes de requêtes (jin/query/QueryOfQuery)
Faciliter le traitement de résultats de requêtes. (jin/query/QueryResult)
Communication
Déploiement et appel de services REST sécurisés (jin/com/rest/*)
Déploiement et appel de Webservices (jin/com/webservice/*)
Travail facilité avec Curl (jin/com/Curl)
Connexion boite mail IMAP (jin/mail/MailConnector)
SSO (Authentification unifiée, via l'usage d'un serveur CAS) (jin/external/jasig/*)
Communication facilitée avec ElasticSearch. (Construction de requêtes de recherche complexes) (jin/external/diatem/sherlock/*)
Utilisation d'API de partage social (Facebook, Google+, Instagram, Linkedin, Pinterest, Twitter)
Optimisation du développement
Gestion des logs (jin/log/Log)
Système de debug avancé (jin/log/Debug)
Analyse des performances (jin/log/PerfAnalyser)
Etendre PHP
Travail facilité avec le système de fichiers (jin/filesystem/*)
Lecture et création rapide et facile de fichiers Csv et Excel (jin/dataformat/*)
Gestion de fichiers sécurisé (jin/filesystem/PublicSecuredFile)
Classes facilitant le travail avec les listes, les tableaux, les numéraires, les chaînes et les objets temporels (jin/lang/*)
Travail facilité avec Json (jin/dataformat/JSon)
Ensemble de classes permettant le retraitement d'images et l'application de filtres (jin/image/*)
Accélérer et faciliter les développements front-end
Composants d'affichage (jin/output/components/*)
Moteur simplifié de routage et de rendu pour la construction d'application Web (jin/output/webapp/*)
Gestion de formulaires (jin/output/form/*)
Détection du contexte (Navigateur et Device) (jin/context/*)
Envoi de mails avancés (jin/mail/MailSender)
Gestion des traductions (jin/language/*)
Mise en cache de données. (Support du cache fichier et Memcache) (jin/cache/*)
$extension = end(explode(".", $file_name));
Bonnes pratiques pour utiliser UTF-8 avec PHP.