A well stated answer, Revenged. I will just add that there is not just one "endorphin" but instead it is a term for an entire class of compounds, which, as Revenged mentioned, are referred to as endogenous opioids in the scientific literature. These include compounds such as enkaphalin, dynorphin and endomorphin.
Also, since the question of legality was not answered, morphine is a controlled substance, which means it can only be legally obtained through a prescription, for medical purposes, or appropriate licensing from the Drug Enforcement Agency (DEA), such as for research purposes.