The History of Prostitution: Its Extent, Causes and Effects throughout the World is a book published by William Wallace Sanger in 1858. It analyzes prostitution in different civilizations throughout world history with a particular focus on New York in the 1850s.
Context.
Sanger started his studies of medicine in 1842 in Wheeling, West Virginia and finished them in 1846 in New York City. In the same year, he was appointed first resident physician of Blackwell's Island. This island had been used by the city for almshouses, prisons, asylums and other institutions since 1826 and due to a large number of residents, the governors of Blackwell's Island found it necessary to have a resident physician. One of the main tasks of the resident physician was to cure prisoners with syphilis. Due to strong stigma against this disease, hospitals did not treat it and the only way for cure was to be sent to prison.
Syphilis had been a prominent and feared disease in the Western world since the times of Ancient Rome. In the 18th century its prevalence increased rapidly and continued to do so in the 19th century. While most European countries were at the time developing measures to contain the disease, this was not the case in North America as social stigma against syphilis was too strong to even acknowledge it. Therefore, infection rates increased particularly rapidly there and skyrocketed in the 1850s. The only ones who observed this increase were the staff of Blackwell's Island, the only place in which syphilis was treated, and particularly William W. Sanger who was the responsible physician for the treatment. 
Concerned by this increase and overwhelmed by the number of patients, the Board of Governors of the Almshouse of Blackwell's Island issued a request to investigate the extent, origins, and consequences of syphilis in New York City on January 23, 1855. The president of the board, Isaac Townsend, was particularly concerned with this issue. The request was directed to William W. Sanger who, being the physician who treated the syphilis patients on Blackwell's Island, was deemed the expert on this topic. From interacting with the patients, Sanger knew that most infected people were either prostitutes or had infected themselves during intercourse with a prostitute. He thereby recognized that the spread of syphilis was inseparably tied to prostitution. From this he concluded that combating syphilis required combating prostitution. He was also of the opinion that to gather a full understanding of prostitution it was necessary to look beyond New York City and investigate the phenomenon in its entirety. Therefore, he responded to the request of the governors by investigating and accumulating all knowledge about prostitution that was accessible to him and conducting interviews with 2000 prostitutes in New York City. The book was written between 1856 and 1857. On February 13, 1858, a fire destroyed the island hospital in which it was stored before having been published. Sanger had to rewrite the book based on a first draft which had been preserved. He finalized it again on August 10, 1858, and published it on April 1, 1959.
Contents.
Chapters I-V: Prehistoric civilizations.
Sanger begins his investigation by highlighting that prostitution is an evil that has always existed. He draws upon the oldest sources available to him which describe early Jewish civilizations. Some Jewish leaders had tolerated prostitution while others had acted strongly against it. Regardless, it had existed in all Jewish societies. Sanger explains that in every group there had been men whose appetite could not be satisfied by marital bonds and that it was women's weakness which made them susceptible to fall into satisfying illegitimate demands for money. Most Jewish leaders considered prostitution foul because of health concerns. Prostitutes were often found to have gonorrhea-like diseases which the Jews considered a sign of uncleanliness or evil possession and therefore concluded that prostitution was unclean business for which God punished them with disease. For this reason, the Jews were also convinced that the sin lies entirely within the woman who prostitutes herself, not the man who claims her services. Sanger furthermore hypothesizes that circumcision may initially have developed as an early measure against genital diseases and only later became a religious act.
In contrast to the Jews, prostitution was celebrated in Ancient Egypt. Sanger explains how the Egyptians displayed their sexuality and lust openly, and were often nude in public. Prostitutes were treated as regular members of society and regarded highly for their jobs. The temples were the only places in which sex and nudity were forbidden.
In Ancient Greece prostitutes were no longer celebrated, but still had a strong influence on politics and philosophy. Sanger compares the cities of Corinth and Sparta with Athens: While the former two showed conditions similar to the Egyptians in which sexuality and prostitution were displayed publicly without any backlash, in the latter some stigma against prostitutes existed depending on their status. "Dicteriades" were female slaves who were owned by the state and did not make any profit themselves. Their "prices" were considerably small and the money was all paid to the state. The "dicteriades" did not enjoy the same rights as regular citizens, but were treated as inferior and were kept away from noble districts and temples. "Concubines" were private slaves who had to answer to their master and mistress, and could also be used to satisfy the master's sexual desires. The "hetairae", or kept women, were noble women who cohabited with a man and tended to his sexual urges. They were not as strongly stigmatized as other kinds of prostitutes, and had more freedom than the virtuous women who were not allowed to appear unveiled in public, attend the theater, or express philosophical thoughts. All of which the "hetairae" were permitted to do. Lastly, the "auletrides", or flute-players, were foreign women who were usually not only flute-players but also dancers who the noble men could hire for events and who were not disinclined to also provide sexual favors to their clients if the price was right. Overall, while prostitutes were generally considered inferior and immoral, no such judgements were made about men who engaged with them. It was considered completely normal for them to engage with prostitutes or own "concubines" or "hetairae" by other men as well as their wives. 
This was entirely different in Ancient Rome where men who engaged with prostitutes were shamed for their act. Still, the greater stigma was on the prostitutes themselves who were considered infamous and irredeemable. Nevertheless, prostitution was extraordinarily common in Rome. In order to bring it under control, the Romans developed a registration system in which every prostitute had to register herself at the state and unregistered prostitution was made illegal. However, this regulation was not enforced strongly and illegal prostitution was very widespread. Especially public institutions such as baths, taverns, shops, or the circus were full of prostitutes, male and female, looking for opportunities to earn extra money from visitors. Moreover, the Roman brothels celebrated the concept of virginity. Whenever a brothel received a new virgin as a prostitute, a crown of laurels over the door to her room would indicate her virginity to customers. The services of a virgin were more expensive than others, but afterwards the customer would be crowned with the laurels from her door, and celebrated by the brothel-keeper and other customers. In the early days of Christianity, the Romans would punish Christian virgin women by sending them as a slave to a brothel so as to take away their virginity. When the Roman Empire converted to Christianity, the landscape for prostitutes changed: The Christians preached and enforced chastity outside of marriage as a holy institution. Therefore, men were equally as guilty and sinful for engaging with a prostitute as the prostitutes were themselves. The Christians also introduced the idea of redemption and forgiveness for sinners. Thus, prostitutes were no longer considered irredeemable, but attempts were made to convert them to a virtuous life with the promise of complete forgiveness of their former sins. At the same time, the registration of prostitutes was abolished and there was no legal prohibition of prostitution. The Christians, however, prosecuted men who attempted to encourage or force women to engage in a life of prostitution, and punished them severely. 
A small note is made about aboriginal northern European civilizations, in which women were obligated to chastity, and prostitution as a concept was effectively unknown. 
Chapters VI-XXVI: Europe from the Middle Ages to 1858.
The largest part of Sanger's book is dedicated to describing how prostitution evolved in Europe from the Middle Ages until the time at which the book was written. Although the specific conditions varied from state to state, the situation was similar throughout the continent. Throughout the Middle Ages, prostitution was common and popular in all of Europe in all social classes. For the European royals it was generally custom to sleep with anyone they wanted regardless of their class or status. They would keep their affairs in the palace, visit public brothels, demand the spouses or children of other nobles, and generally engage with whomever they wanted, whenever they wanted. However, while it was perfectly accepted among the rich and the royal houses in particular, it was considered vile and disgusting among the poor. In some states, attempts at abolishing prostitution were made, but all of them were unsuccessful. They did, however, serve to increase public stigma against prostitution and were used by many people as a reason or excuse to terrorize and assault prostitutes and their affiliates. Leprosy was a common disease spread by intercourse at that time. Syphilis arose in Europe for the first time in Naples in the late 15th century. Although rumors claimed that it had been imported from America, there was no evidence for that claim. 
France was the first country to introduce a successful regulation of prostitution that was inspired by the Roman registration system: Prostitutes had to register themselves in order to work. They had to pay taxes to the state and in turn were protected by it. Europe had taken over the spirit of the late Roman empire, according to which the greatest evil lay in those who introduced virtuous women to prostitution. As such, women could only enter a life of prostitution out of their own will and any act of procuring was punished with torture, public humiliation, or death. The laws, thus, protected women from being prostituted against their will, but also determined the conditions under which brothels had to be lead, how the brothel-keepers had to treat their prostitutes, and what they had to provide for them. They also forbade underage prostitution and prevented it effectively. The main concerns behind the regulation of prostitution, however, were health concerns and they mainly served as a manner to prevent the spread of diseases. As such, prostitutes received health inspections by a doctor every 14 days or had to report to one every week. Prostitutes who were diagnosed with a venereal disease were immediately removed from the brothel and brought to the doctor's institution where they received treatment for their condition. On the same note, it was illegal for men with a venereal disease to visit a brothel and for every infected prostitution attempts were made to trace the origin of her infection. These laws were very effective in reducing the spread of venereal diseases and generated additional income for the state. Because of this, they were soon adopted with only minor changes by almost all European states. 
The degree to which prostitutes could redeem themselves varied across the continent. Spain was the most liberal in this regard. They had taken over their laws directly from the Romans and had maintained their sentiment the strongest. The stigma against prostitution was strongest in Prussia. Prostitution was tolerated as a necessary evil, but was not permitted and prostitutes were strongly oppressed. The Prussians also did not believe in redemption for prostitution and were generally so conservative in their views on love, sex, and prostitution that they were mocked by other countries for being "stricter than the church". Prussia was the only state that did not adopt the registration system by itself, but only after the French enforced it after conquering Prussia under Napoleon. In the 19th century, public complaints about prostitution and brothels inspired the Prussian state to abolish and forbid prostitution entirely.