Code

There are 30 posts in the PHP category

Displaying posts 1 through 15:

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

PHP
This simple function takes a integer (or decimal value) and returns a human readable time in hours:minutes:seconds format. » 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

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

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

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

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

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

Blog Ping List and XML-RPC Generator

Blogging | PHP | XML
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

.htaccess | PHP | robots.txt | SEO
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
Copyright © 2014, Ink Plant. All rights reserved.