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;
    }
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;
    }
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 ; }
Given some html we will attempt to extract the csrf token from the page.

@param  string $html
@return null|string
Given some html we will attempt to extract the csrf token from the page .