Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
How to Build Rate Limiting into Your Web App Login
Sep 22, 2014 @ 11:12:14

In this new tutorial on NetTuts.com, Jeff Reifman shows you how to build rate limiting into your application to help with issues on your login caused by possible brute force attacks.

Since one of the wealthiest corporations in the world [Apple] didn't allocate the resources to rate limit all of their authentication points, it's likely that some of your web apps don't include rate limiting. In this tutorial, I'll walk through some of the basic concepts of rate limiting and a simple implementation for your PHP-based web application.

He starts with a brief look at how (brute force) login attacks actually work and how that relates to the most common passwords used. He splits out the two main approaches to rate limiting in applications: limit based on failures by username or limiting by IP address. He then gets into the actual code examples, choosing a Yii framework-based application for his illustration. He creates a simple "failed login" database table, shows how to log the attempts and includes a snippet to purge items older than (by default) 120 minutes ago. Finally, he includes the code to check the table and see if the username has too many failures listen and, if so, denies them access.

tagged: rate limiting login application tutorial mysql database

Link: http://code.tutsplus.com/tutorials/how-to-build-rate-limiting-into-your-web-app-login--cms-22133

IBuildings Blog:
PHP Rated Top Scripting Language by Evans Data Corp
Aug 05, 2009 @ 08:21:28

According to this post (by Cal Evans) on the Ibuildings blog (and this report from the EDC), PHP has come out as one of the top scripting languages on the web today.

In their recently released report "Users' Choice: Scripting Language Ratings", Evans Data Corporation (no relation to the author of this article) gave PHP the highest overall ranking of the languages they included in their survey. [...] Given the wide variety of topics, there is no way PHP will ever score first place across the board, however, that is not a bad thing.

Categories the languages were rated on included ease of use, extensibility, community, availability of tools and memory management. PHP got high marks on most with a few (like client-side scripting) lagging behind. Cal sees it from two angles, though - one to celebrate how far PHP has come and the other to look forward to see what things the language needs to improve on.

tagged: evansdatacorp report language compare rate

Link:

Andrei Zmievski's Blog:
Bloom Filters Quickie
Apr 07, 2009 @ 11:13:01

Andrei Zmievski has written a new post about a new extension he's worked up (out of curiosity for the technology) - the pecl/bloomy extension.

A Bloom filter is a probabilistic data structure that can be used to answer a simple question, is the given element a member of a set? Now, this question can be answered via other means, such as hash table or binary search trees. But the thing about Bloom filters is that they are incredibly space-efficient when the number of potential elements in the set is large.

The filters allow false positives with a defined error rate - it gives the "yes" or "no" answer based on the content and you, the developer, decide if that answer falls within a rate that's okay for you and your app. The filters also take the same amount of time to look up items no matter how many are in the set.

He includes an example of the extension in use - defining the number of elements, the false positive allowance and adding/searching data and how the responses would come back from the checks.

tagged: bloom filter pecl extension example false positive rate data structure

Link:

Nexen.net:
PHP Statistics for February 2008
Mar 06, 2008 @ 09:32:00

Damien Seguy has posted the PHP statistics for this month - the results from February 2008 - here's some of the highlights:

  • PHP 5 set record of growth : + 2,5%, up to 32%
  • PHP 5.2 is the second most popular version, ahead of 4.3.
  • PHP 4.4.8's popularity is falling

You can check out the numbers yourself for the month as well as the evolution stats showing how things are progressing. He's also added a new graph this month showing the adoption rate that PHP5 is having in the online world.

tagged: statistics february php5 php4 evolution usage adoption rate

Link:

Experts Round Table:
SWF Frame Rate Extraction
Nov 16, 2006 @ 09:58:00

On the Experts Round Table website, there's this cool bit of code that works with the SWFHeader library to extract the frame rate information from a Flash file.

The first idea is of course not to reinvent the wheel and search for an already-made solution. I had to find a really good way to extract information from a SWF file. I had two trivial ways to go : (a) find an already-made SWF Header Extractor, or (b) work at the binary level.

At first, of course, I turned to the PHP documentation (http://www.php.net/manual/en/) and found out the LibSWF and Ming libraries as candidates.

Of course, the code is provided for his solution, and it's actually quite simple. The class does the hard work of mapping out the data from the Flash file's header. All he needed to do was to reference that value in the result under the 'fps' array key.

tagged: swf flash frame rate extract ming libswf swfheader swf flash frame rate extract ming libswf swfheader

Link:

Experts Round Table:
SWF Frame Rate Extraction
Nov 16, 2006 @ 09:58:00

On the Experts Round Table website, there's this cool bit of code that works with the SWFHeader library to extract the frame rate information from a Flash file.

The first idea is of course not to reinvent the wheel and search for an already-made solution. I had to find a really good way to extract information from a SWF file. I had two trivial ways to go : (a) find an already-made SWF Header Extractor, or (b) work at the binary level.

At first, of course, I turned to the PHP documentation (http://www.php.net/manual/en/) and found out the LibSWF and Ming libraries as candidates.

Of course, the code is provided for his solution, and it's actually quite simple. The class does the hard work of mapping out the data from the Flash file's header. All he needed to do was to reference that value in the result under the 'fps' array key.

tagged: swf flash frame rate extract ming libswf swfheader swf flash frame rate extract ming libswf swfheader

Link:

Andi Gutmans' Blog:
PHP 5 Adoption has Tipped!
Jul 17, 2006 @ 05:45:19

According to this new post on Andi Gutmans' blog today, the adoption of PHP versions seems to be tipping in favor of PHP5.

PHP 5 was released in July 2004. Since its release two years ago, there has been a lot of talk about its adoption rate and whether it will surpass the PHP 4 installed base. No doubt that it will still take some time for PHP 5 to reach PHP 4's existing installed base. The main reason for this are the numerous PHP 4-based applications that were built over the years, and if it's not broken, don't fix it.

He includes a graph showing the adoption of both PHP4 and PHP5 versions, noting a large increase from the release of the 5.1 version of PHP.

Although I knew many were waiting for PHP 5.1 before upgrading, its release in last November seems to have created a huge increase in PHP 5 adoption. In July over 74% of support tickets were by customers using PHP 5 (and remember we do support both versions).
tagged: adoption rate php5 php4 existing applications graph adoption rate php5 php4 existing applications graph

Link:

Andi Gutmans' Blog:
PHP 5 Adoption has Tipped!
Jul 17, 2006 @ 05:45:19

According to this new post on Andi Gutmans' blog today, the adoption of PHP versions seems to be tipping in favor of PHP5.

PHP 5 was released in July 2004. Since its release two years ago, there has been a lot of talk about its adoption rate and whether it will surpass the PHP 4 installed base. No doubt that it will still take some time for PHP 5 to reach PHP 4's existing installed base. The main reason for this are the numerous PHP 4-based applications that were built over the years, and if it's not broken, don't fix it.

He includes a graph showing the adoption of both PHP4 and PHP5 versions, noting a large increase from the release of the 5.1 version of PHP.

Although I knew many were waiting for PHP 5.1 before upgrading, its release in last November seems to have created a huge increase in PHP 5 adoption. In July over 74% of support tickets were by customers using PHP 5 (and remember we do support both versions).
tagged: adoption rate php5 php4 existing applications graph adoption rate php5 php4 existing applications graph

Link:

Denis de Bernardy's Blog:
php4, php5 and php6 - thoughts and stats
Jun 07, 2006 @ 06:25:31

As most PHP developers (and companies looking at using PHP) can tell from some of the recent stats, PHP5's adoption rate has been pretty slow ever since it was released. A lot of PHP applications have been written to use the PHP 4 series, but most would agree that a move up would be a good thing. So, why haven't they? Denis de Bernardy wonders about this too in his latest blog posting.

If you think php5 is a no brainer choice since it's been around for almost three years now, you might want to think again.

I can find lots of reasons to develop in php5 rather than php4. php5 is closer to what I'd expect from an object oriented language, and it's reportedly 25% faster. Not to mention the pdo class, which is wonderful to work with.

Then again, developing software that 50% of your user base simply cannot use doesn't make any sense.

He backs up the point with some statistics that Semiologic collected recently, showing that the PHP 4.4.x series is a clear winner on usage. If a change that wasn't so dramatic (PHP4 to PHP5) has this kind of effect on the version usage, what kind of adoption rate will we see when PHP 6 comes around?

tagged: php4 php5 php6 usage statistics adoption rate php4 php5 php6 usage statistics adoption rate

Link:

Denis de Bernardy's Blog:
php4, php5 and php6 - thoughts and stats
Jun 07, 2006 @ 06:25:31

As most PHP developers (and companies looking at using PHP) can tell from some of the recent stats, PHP5's adoption rate has been pretty slow ever since it was released. A lot of PHP applications have been written to use the PHP 4 series, but most would agree that a move up would be a good thing. So, why haven't they? Denis de Bernardy wonders about this too in his latest blog posting.

If you think php5 is a no brainer choice since it's been around for almost three years now, you might want to think again.

I can find lots of reasons to develop in php5 rather than php4. php5 is closer to what I'd expect from an object oriented language, and it's reportedly 25% faster. Not to mention the pdo class, which is wonderful to work with.

Then again, developing software that 50% of your user base simply cannot use doesn't make any sense.

He backs up the point with some statistics that Semiologic collected recently, showing that the PHP 4.4.x series is a clear winner on usage. If a change that wasn't so dramatic (PHP4 to PHP5) has this kind of effect on the version usage, what kind of adoption rate will we see when PHP 6 comes around?

tagged: php4 php5 php6 usage statistics adoption rate php4 php5 php6 usage statistics adoption rate

Link: