background preloader

Php

Facebook Twitter

AuthManager - Une plateforme PHP de gestion d'utilisateur opensource. Auth Manager est une plateforme PHP open source permettant de mettre en place un système d'authentification et de gestion d'utilisateurs.

AuthManager - Une plateforme PHP de gestion d'utilisateur opensource

Si vous êtes amenés à développer un site ou web app en PHP from scratch (Sans framework ni CMS), vous aurez sans doute la tâche laborieuse de re-développer toute la partie gestion utilisateur. Plutôt que de réinventer totalement la roue, vous pourriez opter pour l'intégration d'Auth manager qui vous permettra de gagner du temps précieux tout en conservant la liberté du from scratch. La plateforme dispose de plusieurs fonctionnalités: Protection du contenu avec une simple ligne de codeGestion du login via Facebook ConnectProtections anti spam (reCAPTCHA)Gestion des utilisateurs en adminLogs des accès utilisateursTemplates d'emailsGestion de l'internationalisation Pour protéger certaines partie de votre code, il suffit de rajouter une condition simple: 01.if ($sesslife == true) { 05.} else { A tester pour un éventuel futur projet !

Secure Salted Password Hashing - How to do it Properly. If you're a web developer, you've probably had to make a user account system.

Secure Salted Password Hashing - How to do it Properly

The most important aspect of a user account system is how user passwords are protected. User account databases are hacked frequently, so you absolutely must do something to protect your users' passwords if your website is ever breached. The best way to protect passwords is to employ salted password hashing. This page will explain why it's done the way it is. There are a lot of conflicting ideas and misconceptions on how to do password hashing properly, probably due to the abundance of misinformation on the web.

IMPORTANT WARNING: If you are thinking of writing your own password hashing code, please don't!. If for some reason you missed that big red warning note, please go read it now. You may use the following links to jump to the different sections of this page. The perfect PHP clean url generator. 40+ Techniques to enhance your php code – Part 1. In this series we are going to look into some useful tips and techniques that can be used to improve and optimise your php code.

40+ Techniques to enhance your php code – Part 1

Note that these php tips are meant for beginners and not those who are already using mvc frameworks etc. The Techniques 1. Do not use relative paths , instead define a ROOT path Its quite common to see such lines : This approach has many drawbacks : It first searches for directories specified in the include paths of php , then looks from the current directory. When a script is included by another script in a different directory , its base directory changes to that of the including script. Another issue , is that when a script is being run from cron , it may not have its parent directory as the working directory. So its a good idea to have absolute paths : Now this is an absolute path and will always stay constant. So now even if you shift your project to a different directory , like moving it to an online server , the same code will run without any changes.

Create Instagram Filters With PHP. In this tutorial, I'll demonstrate how to create vintage (just like Instagram does) photos with PHP and ImageMagick.

Create Instagram Filters With PHP

Wait? What? Yes, you can do this very thing with PHP and ImageMagick, and that's just scratching the surface! Once upon a time - technically 22 years ago (5 years before PHP) - ImageMagick was released. Since then, it has evolved to a platform independent software suite that can create, edit, compose, or convert raster images (over 100 formats supported!). ImageMagick is command-line Photoshop for web. PHP comes bundled with GD (GIF Draw/Graphics Draw), which is a library for the dynamic creation of images. These two can't compare on higher levels, therefore, we will use simple example, like resizing.

In the example below, we have to call six functions, and possibly perform some calculations if we have variable aspect ratio. Best of PHP scripts for the PDF file creation. There are several cases for a web application where a dynamic PDF file is a great solution for your digital documents.

Best of PHP scripts for the PDF file creation

Think about order documents in your eCommerce application, coupons for your marketing campaign or just the PDF version from your web pages. There are plenty of situations were a dynamic PDF document is a great way to solve problems, too. Using PHP it’s possible generate those PDF files. How to use Mysql Transactions with PHP. Web applications are more popular today than ever with the increasing number of internet users.

How to use Mysql Transactions with PHP

Most of the standard alone applications converted as web based applications or at least they try to provide a web interface for users. PHP and Mysql are two leading technologies which allow uses on rapid development of web based systems. "Transaction" is a powerful concept which comes with Mysql 4.0 and above versions. Lets explore that. Web based applications have different types of requirements and some of them prefer more consistency on its data than others. Deduct XXX amount form Bobs account.Add XXX amount for Alices account. If both queries executed successfully, it will be great. "Transactions" can solve this problem with a great solution which will ensure the consistency of the database states. Transaction StartDeduct XXX amount form Bobs account.Add XXX amount for Alices account.