  We describe a code designed for hot media {(T $\ge$} a few 10$^4$ K),
optically thick to Compton scattering. It computes the structure of a
plane-parallel slab of gas in thermal and ionization equilibrium, illuminated
on one or on both sides by a given spectrum. Contrary to the other
photoionization codes, it solves the transfer of the continuum and of the lines
in a two stream approximation, without using the local escape probability
formalism to approximate the line transfer. We stress the importance of taking
into account the returning flux even for small column densities (10$^{22}$
cm$^{-2}$), and we show that the escape probability approximation can lead to
strong errors in the thermal and ionization structure, as well as in the
emitted spectrum, for a Thomson thickness larger than a few tenths. The
transfer code is coupled with a Monte Carlo code which allows to take into
account Compton and inverse Compton diffusions, and to compute the spectrum
emitted up to MeV energies, in any geometry. Comparisons with {\sc{cloudy}}
show that it gives similar results for small column densities. Several
applications are mentioned.
