What would be a good pinhole camera to record an iphone screen at a distance of 5-8 m and be able to read the information on the screen? We have tried some pinhole cameras already but without any success. The iphone screen can barely be seen at that distance let alone read its contents.
You're going to need something custom-built. A back-of-the-envelope calculation says that to read an iPhone screen at 8 meters, you need a lens with a 50mm-equivalent focal length of 1000mm. Lenses that long are available for DSLRs and a few point-and-shoot cameras, but not for anything smaller. Expect to spend between tens of thousands and hundreds of thousands of dollars, depending on the quality of image you want.
Alternatively, if you've got contacts with one of the major intelligence agencies (CIA, MI6, FIS, etc.), you might see about borrowing some of their hardware.