For searching logs, you will often want to see the content surrounding the string you are searching for with grep. (more…)

There are multiple ways to read files with PHP. You can use file(), file_get_contents(), fsockopen(), or fopen() functions. If you want to read through a file line by line, though, you will want to use one of the latter two and use their pointer to navigate through your file. Get the code.

Setting up a 404 page on your webserver was the easy part. Now you have found that your site or application has begun to exhibit strange behaviors with redirects or variable values or sessions. Find the real 404 Not Found

This is a companion article to a JavaScript version of the same tutorial. This article is intended for PHP developers who want to pull WordPress and other blog posts into a non-Wordpress or non-blog web page.

If you are using PHP, I recommend you use this method, as it is cleaner than JavaScript and completed entirely at server-side. see the code.

RSS Feeds. AKA Really Simple Syndication. As a professional web developer of over 13 years, I have to say that I never really understood why anyone would use them. Seemed like a nice idea, but never had any attraction for me.

I still had to work with them all the time because they were “in vogue” and I simply saw them as a way for other a**holes to steal content from legitimate authors. (Side note: if you are here to steal content from other websites, you can choke on something). Strangely, after all this time, I have found that the same mechanism can be quickly used for good

As with many things in PHP, manipulating strings can be handled a number of ways. I often find myself creating a string of items from an array for presentation on screen or entry into a database. I figured now would be a good time to explore the best method of removing that pesky comma that usually ends up at the end of a looped string (which just so happens to be the wrong way of going about it). The proper way

You want to conceal files in a directory on your webserver. Other internet boards tell you to simply move the stupid thing out of the web directory. Chances are, you would have done that obvious thing had you been able to. Let’s fix that. Find the 404 Not Found

While I do prefer to develop, any developer worth his salt is cross-trained in basic server-related tasks.
Using an .htaccess file is one of those tasks. Get your Rewrite syntax

I just came across a need to do some JavaScript validation for radio buttons and had the pleasure of being reminded that radio buttons aren’t referenced as other form elements are. I decided to throw together this quick tutorial as a reminder of how to do it. Reference Radio

It has been three years ago this month that PHP 5.3.0 was released and quite a few legacy functions became deprecated. Since I have my hands on a serious amount of aging enterprise projects, I can without a doubt say that the most common deprecated function I see is split(). Upgrade your code inside.