private function extractToken($html)
    {
        $token = null;

		$regex = '#<input type="hidden" name="token" value="(.*?)" />#s';

		if (preg_match($regex, $html, $matches) === 1)
		{
			$token = $matches[1];
		}

        return $token;
    }