An effective inter-atomic potential is proposed in order to describe structural and dynamical properties of II-VI and III-V semiconductors. The interaction potential consists of twoand three-body interactions. The two-body term takes into account steric repulsion, charge-induce dipole interaction due to the electronic polarizability of ions, Coulomb interaction due to charge transfer between ions, and dipole-dipole (van der Waals) interactions. The three-body term, which has a modified Stillinger-Weber form, describes bond-bending as well as bond-stretching effects. Here we report the fitting and the application of this interaction potential for InP in the crystalline phase and for CdTe in the crystalline and liquid phases. The structural correlations are discussed through pair distribution, coordination number and bond-angle functions. Vibrational density of states for InP and CdTe as well as the static structure factor for liquid CdTe are in very good agreement with experimental data.