Facebook Twitter

Easy Wins For More Performant PHP. Introduction Making your website more performant can require a lot of layers.

Easy Wins For More Performant PHP

From setting up a reverse-proxy cache with Varnish to configuring a group of load balancers, there are many well-documented options. What if you're just starting out? Laravel Cheat Sheet. Check Member's/ User's Online or Offline Status. Introduction The following piece of code will calculate the last visited time of a Member/User and calculate the time difference with the current time.

Check Member's/ User's Online or Offline Status

And if the Member/User's last visited time is greater than 10 minutes then that will be considered OFFLINE status, otherwise ONLINE. Background. Accessing Incoming PUT Data from PHP. Recently I started writing a REST service.

Accessing Incoming PUT Data from PHP

I began in the usual way, writing a php script, calling it with a GET request, accessing the variables using the PHP superglobal variable $_GET. I wrote code to handle a POST request and used the variables I found in $_POST. Then I tried to write a PUT request. PHP doesn't have a built-in way to do this, and at first I was a little confused as to how I could reach this information. It turns out that this can be read from the incoming stream to PHP, 20 All Too Common Coding Pitfalls For Beginners. Regardless of our current skill level, we all were beginners at one point in time.

20 All Too Common Coding Pitfalls For Beginners

Making classic beginner mistakes comes with the territory. Today, we've asked a variety of Nettuts+ staff authors to chime in with their list of pitfalls and solutions - in a variety of languages. Learn from our mistakes; don't do these things!


Login. Formulaires. PHP Coding Guidelines | PHP Developer. These are the guidelines that I follow when writing my PHP scripts, unless a coding standard already exists for the project I’m working on.

PHP Coding Guidelines | PHP Developer

It can be helpful to have something like this if you’re working on a joint project. N.B. Php-mobile-detect - PHP class for mobile device detection. Mobile_Detect is a lightweight PHP class for detecting mobile devices.

php-mobile-detect - PHP class for mobile device detection

It uses the user-agent string combined with specific HTTP headers to detect the mobile environment. Download Latest stable version: Working with Files in PHP. You may well be familiar with databases such as MySQL and Access which are an ever-increasingly common means of storing data.

Working with Files in PHP

But data is also stored in files, like Word documents, event logs, spreadsheets, image files, and so on. Databases generally require a special query language to retrieve information, whereas files are ‘flat’ and usually appear as a stream of text. Most often when working with files you’ll read from or write to them. S blog: PHP Sucks! But I Like It! I read a rather interesting post yesterday called PHP: a fractal of bad design.

s blog: PHP Sucks! But I Like It!

It's been getting a lot of traffic among the PHP community lately because it's rather inflammatory. But to be honest, it does make a lot of really good points. Phpquery - phpQuery - jQuery port to PHP. PhpQuery is a server-side, chainable, CSS3 selector driven Document Object Model (DOM) API based on jQuery JavaScript Library.

phpquery - phpQuery - jQuery port to PHP

Library is written in PHP5 and provides additional Command Line Interface (CLI). PEAR installation pear channel-discover pear install phpquery/phpQuery GitHub Fork & pull request: Pewpew - PHP's Embedded Webserver | PHP-GTK Community. This is a tiny tool that allows you to launch the built in PHP 5.4 HTTP test server with a few clicks.

pewpew - PHP's Embedded Webserver | PHP-GTK Community

It allows you to select which PHP binary you want to use (in case you have multiple on your system) and the document root of the test server. Click the picture for a larger screenshot of the application running. Keep in mind PHP-GTK 2 does not currently support PHP 5.4. Grocery Crud - Un générateur de CRUD basé sur CodeIgniter. Grocery Crud est un générateur de CRUD PHP basé sur le framework CodeIgniter. Dans vos applications web et en particulier dans vos espaces d'administration, vous répétez toujours les mêmes tâches à savoir: Créer une fonction de listing, de création d'une nouvelle entrée, la fonction de modification et celle de suppression.

En d'autres terme, créer un CRUD (Create Read Update Delete). PHP Bug Lost - Déboguer et monitorer vos applications. Comme le Profiler de Symfony2, PHP Bug Lost permet d'ajouter une console de débug et de monitoring sur ses sites à partir d'un seul fichier. En ajoutant ce script, vous pourrez monitorer et déboguer plus facilement vos applications en regroupant toutes les informations essentielles en bas de page, à la manière du profiler de Sf2 ou de Firebug. Ainsi en mode console de déboguage, vous pourrez visualiser les variables instanciées sur votre page, visualiser les requêtes SQL, gérer la gestion de message (erreur, warning, message), le temps d'exécution des pages, etc. Gérer l’envoi de SMS en PHP : TextMagic vous aide. Avez-vous déjà remplacé l’envoi d’un mail par un SMS ? En effet, tout comme de nombreux sites le proposent désormais, envoyer un notification par un message texte, autrement dit un SMS, au lieu d’une notifications par courrier électronique, autrement dit un mail, peut être très utile dans le cas d’informations sensibles, ou urgentes.

Après quelques fouilles sur le Web, j’ai retenu quelques solutions, dont il est très simple de mettre en place. En tout cas pas plus difficile que d’envoyer un mail… Laissez-moi vous montrer comment ! À mon insu, l’envoi de SMS peut être très facile puisqu’il vous suffit d’envoyer un mail… En effet, vous pouvez envoyer votre texte à une adresse e-mail et il sera délivré au numéro que vous avez spécifié. En revanche, cette solution est, dans certain cas, peu optimale… Pourquoi ? Hypertext Preprocessor. Creating a Secure Login System the Right Way | Tinsology. Making a custom login system is a common task for beginning PHP developers. Jumping right into it, however, may not be the best approach. There are several important aspects to building a login system that not only makes it work, but makes it safe.

Updated on December 15th 2009: Added Session Control Section Updated on December 15th 2010: Switched to sha256. 10 super useful PHP snippets you probably haven’t seen. Text messaging with PHP using the TextMagic API If for some reason, you need to send text messages to your clients cell phones, you should definitely have a look to TextMagic. They provide an easy API which allow you to send SMS to cell phones. Please note that the TextMagic service isn’t free. If PHP Were British. Free Online Tutorial PHP - PAGE. Twig - The flexible, fast, and secure PHP template engine - Homepage. Détecter si le visiteur vient d’un iPhone iPad iPod Android | eBuildy blog, Web, Adobe flex, JQuery,Flash,Prestashop.

10 super useful PHP snippets. 11 jQuery and PHP Tutorials. Geo Tools. Adaptive Images - Des images adaptées auto aux résolutions écran. [PHP 5.1] Classe d'Upload et Redimensionnement. Object-Oriented PHP: Working with Inheritance. Dompdf - HTML to PDF converter (PHP5) Benchmarks. Phar – PHP archiving practice. Les flashcodes, comment les générer automatiquement et facilement avec PHP.

Photobooth with PHP, jQuery and CSS3 | Tutorialzine | Webdesign code.