Dogs cannot take ibuprofen, advil, tylenol or motrin but some aspirin may be ok.
You can read about the precautions and get dosage information here:
http://www.school-for-champions.com/animalhealth/aspirin.htm
But there are other medications that are much better for pain so only make this a temporary solution.
Let me know if you have more questions about this.
Not an active Expert