Is the "belly of a whore" phrase from the Bible? Several times, I have heard a phrase along the lines of "It is better to plant thy seed in the belly of a whore than to be cast upon the ground."

Is there a biblical reference for this phrase? I can't find it in the protestant Bible...
There is no such verse in the Bible. The reference to spilling one's seed on the ground comes from Genesis 38:9 NASB:


  Onan knew that the offspring would not be his; so when he went in to
  his brother's wife, he wasted his seed on the ground in order not give
  offspring to his brother.


From here.

There's a fuller explanation from the site I linked to as well.

This is usually a saying that comes up in reference to masturbation.  That's not really what the verse is talking about, but that subject has been discussed on this site here.