There are 28 posts in the PHP category
Displaying posts 1 through 15:
Evaluate Arithmetic Strings
Use PHP's eval function, with a little added security, to allow users to evaluate simple math equations through a form. Handy in the context of larger projects. » View Post
Title Sort MySQL Results
Shows you how to sort MySQL results by title, ignoring indefinite and definite articles (a, an, the). » View Post
Resize an Image on the Fly with PHP
Easy PHP functions that let you resize images automatically using PHP. One keeps the same aspect ratio by cropping. Another function allows you to set a max width or height and shrink to fit. Or you can force to specific dimensions. » View Post
Form Helper Class
Helper for generating and processing HTML forms with PHP. Includes functions for easy creation of text input, dropdowns, radio buttons, checkboxes, hidden fields, date dropdowns, and more. » View Post
Get All Twitter Posts of a Specific Hashtag in PHP
A quick and easy PHP function that uses Twitter's Search API to return recent Tweets with a specific hashtag. » View Post
Different Types of Intelligence
A random question (what are the odds of getting a four of a kind dealt in a 6 card hand) led to a mini-exploration into the different kinds of logic that people use to solve problems. Includes code on how I figured out the answer. » View Post
Get Website Screenshots Using PHP
Tutorial and code showing how to use PHP's built-in imagegrabwindow function to take a screenshot of a website and then crop, resize, and save it as a JPEG image. » View Post
Calculate the Distance Between Two Points in PHP
A simple, easy-to-understand PHP function that calculates the distance between two sets of latitude and longitude coordinates in miles, km, feet, and meters. » View Post
How to Create a Symbolic Link in Windows Vista
Quick step-by-step instructions explaining how to create shortcuts to another directory in your file system using mklink when using Windows Vista. » View Post
Shortening URLs in PHP with the bit.ly API
A quick, easy-to-use PHP function that takes your long URL's and converts them into something short and ready to post on Twitter, etc. Just plug in your bit.ly username and API Key and you're ready to go. » View Post
Convert an Entire MySQL Table to UTF-8
A PHP function (with lots of comments) that converts a MySQL table and its data to UTF-8. It updates the collation of the table itself and of each text-based column. Additionally, it goes through each row and updates existing data automatically. » View Post
Blog Ping List and XML-RPC Generator
An up-to-date list of blog ping endpoints. Also, a tool to construct your XML-RPC request to send to them. » View Post
Block Crawlers from HTTPS with Robots.txt
If you allow search engine crawlers to index both HTTP and HTTPS versions of your site, you can run into some serious SEO issues. This quick guide explains how to stop that from happening with .htaccess, PHP, and robots.txt. » View Post
Convert Hex to Decimal Functions
The PHP functions you need to go from RGB values to a hexadecimal string and visa versa. » View Post
MySQL Vertical Display in HTML Table
PHP code to display results from a MySQL query sorted vertically (rather than horizontally) in a table. Very simple and allows for custom number of columns. » View Post