How to get remote file size

get remote file size
Standard

Many time before we download a file from remote server, we need to know the size of the file, and there’s a couple way to get remote file size from http server, here they are:

  • curl, bash

    get remote file size using curl

    get remote file size using curl

  • PHP

    Screen Shot 2016-02-19 at 8.36.56 AM

    get remote file size PHP code

    and  the running result

    get remote file size PHP

    get remote file size PHP

  •  Ruby

    get remote file size ruby

    get remote file size ruby

 

simple way to get remote file size eh ? any suggestion please comment

Leave a Reply

Your email address will not be published. Required fields are marked *