Use bare php to resize image on the basis of URL