How can I check weather URL start with https or http
You can use php native function – parse_url to check if the url is https or http
$parse_url = parse_url($url); if($parse_url['scheme'] == 'https'){ return true; }