Code

Here, you'll find chunks of PHP, MySQL, HTML, JavaScript, and Ajax code that we've put together while working through various projects. Hopefully they'll help you out in your coding adventures too.

Can I use an image that's not on my page for Pinterest pinning?

CSS | Pinterest
The quick answer is yes. This quick article will show you how using a little CSS trickery. » View Post

Evaluate Arithmetic Strings

PHP
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

Linux Cheatsheet

Linux
A few handy references for common Linux command line commands, like how to add a user, restart Apache, etc. » View Post

Title Sort MySQL Results

MySQL | PHP
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

Images | 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

HTML | PHP
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

PHP | Twitter
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

PHP
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

Delete an Entire Google Apps Account Domain

Email | Google Apps
This is a quick guide explaining how to cancel an entire free or premium Google Apps domain. It took me a while to figure out how to shut my testing one down, so I figured I'd share the knowledge. » View Post

Get Website Screenshots Using PHP

PHP | Windows
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

How to Forward Email on a Linux Server

Email | Linux | VI Editor
A few tips on setting up email forwarding on your Linux (or UNIX) box. Includes instructions on how to forward to multiple email addresses from one account. » View Post

Calculate the Distance Between Two Points in PHP

Maps | 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

Command Prompt | PHP | Windows | XAMPP
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

PHP
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

HTML | MySQL | PHP
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
Copyright © 2013, Ink Plant. All rights reserved.