Wii Code

This php-script/web-page shows your wii number, and allows other people to enter their wii number for you to add them in return. It is error checked, so you won't get any spam through it, and it emails their wii number straight to your inbox for you to add to your wii manually. Annoyingly you can't automate the adding to your wii :-(

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
	My Wii number
		My "http://wii.com/""Nintendo Wii"Wii number is
		"number"6328 3044 1710 7780
		if (preg_match("/^\s*\d{16}\s*$/", $num) || 
preg_match("/^\s*\d{4}\s+\d{4}\s+\d{4}\s+\d{4}\s*$/"'to' "wii@caius.name",
				"subject" => "Wii code to be added",
				"message" => "Someone added you to their wii, please add them back.\n{$num}"
			mail($email["to"], $email["subject"], $email["message"]);
			echo "Code entry successful, I'll add you on my wii!";
		} else {
			echo "Code entry error. Are you sure that was a wii code?!";
	} else {
		# Form wasn't submitted
			"<?php echo $_SERVER['PHP_SELF'] ?>" method="post" accept-charset="utf-8">
				<label for="your_number">Your Wii's number:</label>
				<br />
				<input type="" name="your_number" value="xxxx xxxx xxxx xxxx" id="your_num" 
				<p><input type="submit" value="Continue &rarr;"></p>
Example 1 -- wii.php -- Select Code

Copy/Paste to wii.php, edit your wii number & email address and you're good to go!