How are blocks added to the blockchain?

This page covers how Bitcoin miners "solve" a block of transactions and add it to the blockchain.
//This reverses and then swaps every other char function SwapOrder($in){ $Split = str_split(strrev($in)); $x=''; for ($i = 0; $i < count($Split); $i+=2) { $x .= $Split[$i+1].$Split[$i]; } return $x; } //makes the littleEndian function littleEndian($value){ return implode (unpack('H*',pack("V*",$value))); } /* pack() = Pack data into binary string string pack ( string $format [, mixed $args [, mixed $... ]] ) V = unsigned long (always 32 bit, little endian byte order) H = Hex string, high nibble first */ ?> // original block data $version = 1; $hashPrevBlock = '00000000000008a3a41b85b8b29ad444def299fee21793cd8b9e567eab02cd81'; $hashMerkleRoot = '2b12fcf1b09288fcaff797d71e950e71ae42b91e8bdb2304758dfcffc2b620e3'; $time = 1305998791; $bits = 440711666; $nonce = 2504433986; ?>