5

How can I check on the web if someone is visiting a page with a 3G mobile connection (so no WiFi)? This because I want to show a video when someone has a normaal speed internet connection on his phone (with WiFi). If someone has a slow (not WiFi) internet connection on his phone at that moment, I want to show a photo instead. So the user doesn't have to download the 30MB video file with his try connection, and destroying his bandwidth limit of his provider. I prefer a client-side solution with jQuery/Javascript or server-based with PHP if possible.

user1670816
  • 401
  • 2
  • 5
  • 17
  • see [HTML5 video for iPhone / iPad. How to detect connection speed?](http://stackoverflow.com/q/4185266) and [Is there a way to detect 3G and 2G connections speed on mobile phones and handheld devices?](http://stackoverflow.com/q/6885402) – CharlesB Sep 14 '12 at 08:22

1 Answers1

0

Found an interesting approach to estimate the connection speed with PHP : http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/

The estimated speed will depend on the connectivity with the server so it is not so accurate but may give you a great idea. You could display the photo whenever the result is lower than a certain value.

Frederik.L
  • 5,522
  • 2
  • 29
  • 41