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.

Assigning a Virtual Domain Name to Your Localhost

Apache | OSX | Windows
Here's how to access your pages via something like http://intranet/ over your local network using Apache and a slightly modified local hosts file. » View Post

Add Social Media Share Buttons to Your Site without JavaScript

Facebook | Google+ | PHP | Pinterest | Twitter
Let your users share your content on Facebook, Twitter, Google+, and Pinterest without having to depend on JavaScript. » View Post

PHP Function to Format an Integer as HH:MM:SS

This simple function takes a integer (or decimal value) and returns a human readable time in hours:minutes:seconds format. » View Post

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

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

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

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

Helpers | 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, file uploads, 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

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
Copyright © 2014, Ink Plant. All rights reserved.