Tag Archives: php

Hiding PHPSESSID

I’ve built GlitterPony Magazine’s website so that it is dynamic. All I need to do is put the poems into the database fill in a field or two and I’ve got a functioning website. Of course the site is written in strict xhtml so that I can have a new look to each issue [...]

Generating a Random User Password in PHP

Creating a custom random password generator in PHP isn’t difficult, for my purposes I often use this simple function

// $group is the characters we want the password possibly composed of
// $pass_length is the length we want our password to be
function random_password($group, $pass_length){
for($p=0; $p<$pass_length; ++$p){
// pick a random number, based on the time
$random_num = rand(0, ((double) microtime()* [...]

A PHP Fischer Random Chess Function

This is of limited use, but I thought I’d share the source code to a function I wrote the other day to setup a game of Fischer Random Chess, also known as Chess 960.
The basic idea of Fischer Random Chess is that you shuffle up the back row. The rules say that; 1) the bishops [...]