  The $d$-dimensional scalar field action may be reduced, in the background
geometry of a black hole, to a 2-dimensional effective action. In the near
horizon region, it appears a gravitational anomaly: the energy-momentum tensor
of the scalar field is not conserved anymore. This anomaly is removed by
introducing a term related to the Hawking temperature of the black hole. Even
if the temperature term introduced is not covariant, a gauge transformation may
restore the covariance. We apply this method to compute the temperature of the
black hole of the dilatonic non asymptotically flat black holes. We compare the
results with those obtained through other methods.
