Don't rely on chemicals keep it simple, get the Bissell Little Green Deep Cleaner, I got mine on craigslist for $40. This will get everything out no matter how bad, even an entire milkshake that's had time to soak.
All you need for particularly set in stains is Resolve Carpet treatment, spray full strength and let soak, of course remove any surface stains with a rag or vacuum first. Then use the Little Green with only hot water filled up with a capful of fabric softener to rinse and vacuum out the soapy water. The fabric softener helps make the carpet nice an fluffy when it dries.