Lateral Code
A Web Design Blog Focused on Code and Technology
Currently Browsing: Home » Posts tagged 'php'
Posts Tagged ‘php’
Automated Uptime Verification
By Patrick Lin on Tuesday, August 24th, 2010 | Tags: php, tutorial | No Comments »
If you have ever administered a website, you know that downtime is unavoidable. Creating a system to automatically check if your website is up can help deal with downtime and provide a better user experience. Doing so is quite simple if you have the following tools available:

- A web server other that that on which the website is hosted
- Cron (if you do not have this, you can use an online service)
- PHP with libcurl support
- PHP with mail support (optional)
Coding a Color Manager with Object-Oriented PHP
By Karthik Viswanathan on Thursday, June 17th, 2010 | Tags: php | No Comments »
Colors are a vital part of web design. They can easily make or break a design. Often times, designers are interested in modifying colors by mixing, fading, or brightening them. This will be the basis for today’s article.

We’re going to go through the process of creating a simple color manager with object-oriented PHP. Rather than focusing on multiple forms of modification, our color manager will perform one basic function: fading. Given a base color (hexadecimal) and a fade percentage, we will calculate a new, faded color.
How to Store Arrays in a Database
By Karthik Viswanathan on Tuesday, June 15th, 2010 | Tags: php | No Comments »
When working with databases, it is sometimes necessary to store an array in a MySQL field. Unfortunately, there is no way to directly pass in an array as a parameter. As a result, storing these data structures is a bit more complex, but by no means hard or impossible.

Prevent Form Attacks with Basic Math Security
By Karthik Viswanathan on Monday, June 14th, 2010 | Tags: php | 4 Comments »
Form security is a top priority these days due to the risks of losing sensitive information, getting spammed by bots, being exposed to viruses, and more. As a result, it is important to take steps to secure your forms in order to counter these risks.

In this article, we’re going to create a PHP class to help secure forms with basic math questions. This class will generate two random numbers that must be added by the user in order to ensure a human is submitting the form. Taken as a whole, this class only takes about 10 minutes to write. This begs the question: are you willing to secure your forms for a few minutes of work?
3 Easy Steps to Create Excel Spreadsheets in PHP
By Karthik Viswanathan on Wednesday, February 17th, 2010 | Tags: php | 3 Comments »
Spreadsheets are simple files that help you manage and organize data. They are used everywhere and have become quite popular. You can find them by using Microsoft Excel, Open Office, or even an online alternative such as Google Docs.

Generating Spreadsheets
Since computers and automation have become second nature, spreadsheet generation isn’t out of the ordinary. With MySQL databases, it becomes even more imperative, as spreadsheets are perfect to represent the data located in these structures.
Upon searching for how to create excel spreadsheets using PHP, most of the results came back with libraries that do the job. This seemed to be too much of a hassle. That’s why I’ve created 3 easy steps to create excel spreadsheets without any libraries.