Marty Anstey Logo
 About Me   Hobbies   Business   Programming   Photos   Projects   More... 

PHP Scripts

Here are a few PHP code snippets that you can use in your own programs. Please give credit where credit is due.

  1. UPC and EAN-13 Check Digit Validator
    Validates the check digit in UPC and EAN-13 bar codes.

  2. Binary Search Functions
    Binary search is perhaps the fastest technique for locating information in an array. Here I present both the iterative and recursive versions which I have ported to PHP from popular C code widely available on the web.

  3. Compound Interest Calculator
    This is a simple example demonstrating how to calculate compound interest using PHP.

  4. WS-FTP Password Decoder
    This code is a port of some JavaScript I saw somewhere on the net some time ago. I thought it might be a fun excercise to port it to PHP. Enjoy!

  5. Little or Big Endian?
    A simple function which tells you if your code is executing on a little or big-endian system.

  6. Random Password Generator
    This is an old function I wrote back in the days of PHP3. I have used it quite a bit in the past and so here it is for your downloading pleasure.

  7. MP3 ID3 Tag Extraction Function
    This handy snippet will let your script read all of that juicy information from a local MP3 file's ID3 tag. Very useful for webpages or scripts which must process a large number of MP3 files.

  8. ISO 3166 country codes
    ISO3166 Country codes, in CSV and PHP (array) formats. Useful for creating a pull-down list of countries in forms.

  9. Format seconds
    Simple function to format an interval of seconds to a human-readable representation of days, hours, minutes and seconds.

  10. PHP Tic-Tac-Toe
    This is a reference implentation of a Tic-Tac-Toe game implented in pure PHP. It is intended as a platform for developers and students; and although the reference implentation does not include any AI, it is an excellent starting point for learning about game trees. This version supports arbitrarily large grids and any number of players, both of which are restricted only by common sense.

  11. Wheel of Fortune
    This script is intended as a supporting application for the Wheel of Fortune board game. It is intended to be used on a computer connected to a television, and greatly simplifies portions of the game play. Unique answer files can be loaded depending on the audience to provide for a unique or customized playing experience.




  :: News
 January 1 2010
Wow, is it 2010 already?
 January 1 2009
Welcome to 2009!
 July 29 2008
If you're into folk-rock music, check out the latest album by my dad, R.G. Anstey
 January 1 2008
Happy new year!
  :: Features
  :: Links
  :: Search the Site

Home - Writing/Poetry - Programming - Projects - Music - Travel - Guest Book - Calendar
Business Ventures - PHP Scripts - Web Spiders - Search Engine - Links - Contact Me

Constructed entirely by hand using only TextPad and PhotoShop
Modified Monday December 14, 2009 - 8:27 UTC

(C) Copyright 2000-2010 Marty Anstey ~~ I didn't rip you off, so don't rip me off.