How can I measure the time it took to download or upload a file?

  • 13 years ago
    Hello Everyone,

    I'm working on a PHP application at the moment that has a requirement to record the time it took a user to either download or upload a given file.

    Is that something I could record using PHP? Or would some other language/technology be able to provide this data?

    Cheers.

    Waddo.









  • 13 years ago

    Can't think of a way to time a download, might be some way you can set the server to tell you when it's finished serving a file?

    With a PHP script that's uploading a file, you can use the time() function to find the unix time stamp before and after the fileupload bit, then just subtract one from the other to get the number of milliseconds.

    If you want me to explain that in more depth let me know Big Smile [:D]

  • 13 years ago
    Thanks for that Paul. Can I be a pain and ask you to explain in more detail :-) sorry

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“In theory, theory and practice are the same. In practice, they're not.”