Skip to content Posts

Benchmarking PHP: Inserting text with include(), require(), or get_file_contents()

Often times in PHP you find yourself needing to insert text. Most sites do this by using a database backend, but you also have the option to include data from a text file. Three methods are available for this; require, include, and file_get_contents. Which is fastest, which is best? When should you use one over the other?

StatTraq and WordPress Permalinks

For this and my other blog, I use WordPress with permalinks turned on. I installed an add-in called StatTraq to keep track of statistics. But, the stats page never showed which pages were being shown. It just showed that ‘Multiple Posts’ were being displayed. Honestly, I just assumed this was the way StatTraq was supposed to work until I just happened to get hit by a comment spammer.

TinyP2P – “The World’s Smallest P2P Application”

Ed Felten and Alex Halderman released the smallest fully functional P2P application. TinyP2P is a 15 (yes 15) line Python program.

The authors claim that they are not intending to facilitate copyright infringement, but are trying to show how easy it is to set up a P2P application. TinyP2P was written to show how easy it is to write a functional P2P application, and how pointless it would be to “ban” their creation.

For more information, see the TinyP2P home page.