How many years did spain attacked Philipines?