Update class.php

Added checkhttps