private function validateUrl($url) { if (!filter_var($url, FILTER_VALIDATE_URL)) { return false; } return true; }