background preloader


Facebook Twitter

Face detection in pure PHP (without OpenCV) - Maurice Bloggue. Une résumé en français est disponible en fin d’article.

Face detection in pure PHP (without OpenCV) - Maurice Bloggue

Lately, I’ve been looking for ways to detect faces in photos with PHP. Nowadays, face detection is built in many consumer products (camera obviously, but also Google and iPhoto), and seems to be a pretty common job. 10 code snippets for PHP developers « The html blog. PHP command line syntax checking. Posted April 24th, 2010 in PHP The PHP CLI (command line interface) allows basic syntax checking of a PHP file.

PHP command line syntax checking

I'll show the basic usage of this in this post and then a couple of ways to check all files in a directory, and all files recursively down the directory tree as posted by a couple of people on Twitter. CodeIgniter - Open source PHP web application framework. How-to use PHPMailer for SMTP and GMail. These days I tried some plugin to send e-mail message within WordPress via SMTP.

How-to use PHPMailer for SMTP and GMail

Since my domains email is hosted with Google applications I decided to send my messages via the SMTP server from GMail. I found several articles and PHPMailer tutorials, but a lot of them didn’t worked for me. Why using GMail for sending mail messages? First of all it’s FREE! Sure most website owners can use their own SMTP server for sending email messages from their website, but it makes sense even than to use GMail for sending mail. Requirements. 7 Secure, Lightweight, and Easy to Use PHP Frameworks. Choosing a good PHP frameworks can help you develop complex Rich Internet Applications quickly, with a best practices oriented approach, and saving a lot of time reusing code snippets that are already available.

7 Secure, Lightweight, and Easy to Use PHP Frameworks

There are a lot of interesting PHP frameworks you can choose for your next web project. Which framework you choose is really a personal decision. There is no one “best” framework on the market at the moment. Different frameworks are better for different types of projects, and for different developer. PHP Optimization Tips.

Easy Thumbnails with PHP. Home > Back End, PHP > Easy Thumbnails with PHP.

Easy Thumbnails with PHP

AtomicPHP. 9 Tips For Working with MySQL Databases. MySQL is one of the most popular relational database management systems (RDBMS) around, with over 6 million installations.

9 Tips For Working with MySQL Databases

It’s a fantastic choice for any new developer, because of its open source nature, wide support and abundance of tutorials available on the subject. Here are some great tips and tools (beside phpMyAdmin) to improve your MySQL coding, and to help you save time. Installing SQL If you’re a newbie to the server side coding arena, don’t worry. Installing SQL is very, very simple. Mac only PHP, SQL & Apache Installer Windows, Linux & Mac installer.

Three Quick Tips To Make Your PHP Understandable. Introduction Producing code that clearly conveys a developer’s intent is key to any well written application.

Three Quick Tips To Make Your PHP Understandable

That not only applies to PHP, but every programming language. Developers who emphasize the creation of legible code tend to create applications which are easier to both maintain and expand upon. Twig - The flexible, fast, and secure template language for PHP. 15 very useful PHP code snippets for PHP developers. Following are list of 15 most useful PHP code snippets that a PHP developer will need at any point in his career.

15 very useful PHP code snippets for PHP developers

Few of the snippets are shared from my projects and few are taken from useful php websites from internet. You may also want to comment on any of the code or also you can share your code snippet through comment section if you think it may be useful for others. JpGraph - Most powerful PHP-driven charts. Extremely useful PHP classes. PHP PSD Reader A few weeks ago, I wrote an article about this PHP which allow you to display any Adobe PSD file on screen.

extremely useful PHP classes

Very usefull to create preview of PSDs designed for clients, for example.Download Browser detect One of the most common (and boring) problem for front-end developers is definitely cross-browser compatibility. This PHP class will detect almost all browsers and simplify your cross-browser work.Download. PhpFormGenerator v3.0 beta - create professional web forms in minutes. Jijawi: The PHP Web Installer - Jijawi. Copying tables in MySQL. Whether you need to copy a test table to a production database, or you need to duplicate a table with only some selected rows or you just need to backup the original table, copying tables is a frequent task most of us regularly do.

Copying tables in MySQL

In this post we will see some quick methods to make copies of MySQL database tables. For these examples I’ve used the following table structure. Quickly copying tables. The most common task is to copy the table structures. The following statement copies the structure of the ‘admin’ table to a new table called ‘newadmin’. Note that only the structure and not the data is copied to the new table. In the above examples it is assumed that the source and the destination tables which we want to copy are in the same database, but you can also copy tables from another database by prefixing the database name before the table.

You can also specify the destination database in the query. This will only copy the ‘username’ and ‘password’ columns to the new table. PHP Variable and Array Tests. Quick and Dirty PHP Caching. Advertisement Caching your database-driven website pages has a plethora of benefits, not the least of which being improved speed and reduced server loads. This article will explain how to set up a simple caching system, and will also address when and where caching might not be appropriate. For me, the impetus to switch to a caching method for one of my database driven sites was sparked by Mosso, since they bill by cpu cycle, and I have one site that is, well, humongous (60k+ pages), and it happens to the highest traffic site on the account. While the database queries were all very efficient, and each page had, on average, no more than 6 queries, performance and cpu cycles would both be helped quite a lot by implementing a cache.

This caching solution was a temporary fix, while we switched to a new CMS that was already using a robust caching system. Using output buffering, caching pages is incredibly easy. The basic stuff In all its 6-lines of glory, this is actual, working caching code. Akelos PHP Framework. Ten PHP Best Practices Tips that will get you a job. Posted by blake on Jun 4, 2008 in Code, Performance, PHP | 167 comments The last couple of weeks have been quite the experience for me. I was part of a big layoff at my former company, which was interesting. I've never been in that position before, and it's hard not to take it personally. I started watching the job boards, and a nice-looking full-time PHP position caught my eye, so I sent out a resume and landed an interview.

Before the face-to-face portion, I chatted with the owner and head programmer on a conference call, and they ended up sending me a technical assessment quiz. Find the errors in the following code: So, give it a shot. If you got the missing comma in the parameter list, the "new Array()" error, the colon instead of a semi-colon, the '=' instead of '=>' in the foreach statement, and the erroneous use of '+' on the echo line, then congratulations, you found all the errors! That's not how I answered the question though. 1. 43 Ways to Optimize your PHP Code. PHP Tutorials and Reference Guide.

40+ Invaluable PHP Tutorials and Resources. PHP snippets. A PHP Charting library. SocialEngine PHP Social Network Script - Create your own social media community! Winbinder resources: home. Top 20+ MySQL Best Practices. Database operations often tend to be the main bottleneck for most web applications today. It's not only the DBA's (database administrators) that have to worry about these performance issues. We as programmers need to do our part by structuring tables properly, writing optimized queries and better code.

Here are some MySQL optimization techniques for programmers. Most MySQL servers have query caching enabled. It's one of the most effective methods of improving performance, that is quietly handled by the database engine. The main problem is, it is so easy and hidden from the programmer, most of us tend to ignore it. The reason query cache does not work in the first line is the usage of the CURDATE() function. Using the EXPLAIN keyword can give you insight on what MySQL is doing to execute your query. The results of an EXPLAIN query will show you which indexes are being utilized, how the table is being scanned and sorted etc... After adding the index to the group_id field: Free Address Book Script ( PHP + MySQL )

Ver 1.18 ( Security patch applied ) This is a free Address Book PHP script with a MySQL database. This script allows users to search, view, add, edit, and delete address entries from a web browser. Each user can have a different login username. It's very easy to add/remove fields to/from the script. In fact, I've seen others using this script to store something totally different from addresses. You can customize Address Book Script online and/or manually. To manually customize it, please see Customization Quick Guide. LiveDocx in PHP - Zend_Service_LiveDocx. Generating print-ready well-formatted PDF documents with PHP is not an easy task. Traditionally, there are two main approaches to PDF generation with PHP.

Given sufficient time and patience, both partially get the job done, but still leave a lot to be desired: TCPDF - PHP Class for PDF. It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website. Miles Johnson // Blog: 5 custom PHP functions: Strings. All of these functions can be found within the Titon Utility library. Simple Layouts with PHP. Bits of PHP code - Google Chart API for PHP. Google have released the Google Chart API which enables you to produce swizzy graphs like the above, which is the total 'hours-listened' to BBC Radio 1 from March 1999 to September 2007. In their API documentation, they publish some JavaScript code to help with encoding the URL. Here's the same thing in PHP - which, by default, will also sort out the maximum size as the maximum value in the array you pass it.