Easy Wins For More Performant PHP. Introduction Making your website more performant can require a lot of layers.
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.
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.
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.
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. 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.
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.
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.
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.
Library is written in PHP5 and provides additional Command Line Interface (CLI). PEAR installation pear channel-discover phpquery-pear.appspot.com pear install phpquery/phpQuery GitHub Fork & pull request: github.com/TobiaszCudnik/phpquery. Pewpew - PHP's Embedded Webserver. This is a tiny tool that allows you to launch the built in PHP 5.4 HTTP test server with a few clicks.
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. PHP Bug Lost - Déboguer et monitorer vos applications. Gérer l’envoi de SMS en PHP : TextMagic vous aide. Hypertext Preprocessor. Creating a Secure Login System the Right Way. 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. When Rasmus Lerdorf first put PHP together, he - quite sensibly, despite his heritage - chose not to write it in Greenlandic or Danish. Good job too - that would have been rather unpleasant to work with. He opted instead, being in Canada, for a more local tongue. No, not French. 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. 10 super useful PHP snippets. We Recommend These Resources Having the right code snippet at the right time can definitely be a life saver for web developers. Today, I’ve compiled 10 really awesome PHP code snippets that will, I hope, be very helpful in your forthcomming developments.
Super simple page caching. 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. Home : Articles : Object-Oriented PHP: Working with Inheritance Tutorial by Matt Doyle | Level: Intermediate | Published on 26 May 2011 Categories: Learn how inheritance works in PHP. 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.