Photonic Ising machine is a new paradigm of optical computing, which is based on the characteristics of light wave propagation, parallel processing and low loss transmission. Thus, the process of solving the combinatorial optimization problems can be accelerated through photonic/optoelectronic devices. In this work, we have proposed and demonstrated the so-called Phase-Encoding and Intensity Detection Ising Annealer (PEIDIA) to solve arbitrary Ising problems on demand. The PEIDIA is based on the simulated annealing algorithm and requires only one step of optical linear transformation with simplified Hamiltonian calculation. With PEIDIA, the Ising spins are encoded on the phase term of the optical field and only intensity detection is required during the solving process. As a proof of principle, several 20 and 30-dimensional Ising problems have been solved with high ground state probability.