Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getStyle($url) {
- $size = getimagesize($url);
- return (int)$size[0] > (int)$size[1] ? 'height: 100%;' : 'width: 100%;';
- }
- echo getStyle("https://pp.vk.me/c627723/v627723406/1b5c5/OfbayIeP89U.jpg");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement