I use Resolver Triple Action for when Mia had accidents as a puppy on the carpets. Also for the dirt he sometimes brings in from outside. It works WONDERFULLY! It comes in a bright, red bottle, you can't miss it :)
I swear by my Little Green Cleaning Machine, or something like that by Bissell. They have a solution especially forpet stains. It's worked on every stain that I have ever tried to clean. I paid like $60 or $70 a few years ago, so they may be cheaper now. They have two styles, the more expensive one has an extra attachment, but I just have the cheap one and it works fine.