protected function getUrlSize($url)
    {
        $data = get_headers($url, true);
        if (isset($data['Content-Length']))
            return (int)$data['Content-Length'];
        return false;
    }