The depositions may then be taken in accordance with this section; and the court may make orders for the production of documents and things and the entry upon land for inspection and other purposes, and for the physical or mental examination of persons.