Make thumb using php with respect the ratio width and height

In this post i would like to explain how to create thumbnails with respect to ratio of width and height. Rather than scaling images to create a thumbnails and we can reduce the page...