SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot usmangt's Avatar
    Join Date
    Apr 2009
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Script to find Network Speed/Bandwidth

    Hi,

    I am looking for a php script to detect the network speed/bandwidth.

    I will need it to know that if there is enough network speed/bandwidth to stream a video file or not.

    I Google alot but cannot find it.

    Kindly help.

    Thanks.

    usmangt

  2. #2
    SitePoint Zealot Sogo7's Avatar
    Join Date
    May 2011
    Posts
    129
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    PHP cannot do this trick on it's own and needs some Javascript making an AJAX call running on the client side to tell the server that the page has loaded.

    http://www.dynamicdrive.com/forums/a...hp/t-2198.html
    http://stackoverflow.com/questions/3...n-current-page
    http://ditio.net/2008/08/06/detect-c...th-javascript/

  3. #3
    SitePoint Member
    Join Date
    May 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP can record the starting time and then start outputting random data for say 10 seconds. The amount of traffic transferred in that 10 seconds can be used to detect link speed. It works because TCP has to send acknowledgements for each of its packets before it can continue (with a small error window called the TCP window).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •