Non-Wi-Fi connection with phone detection check

How can I check on the Internet if someone visits a page with a 3G connection (so there is no WiFi)? This is because I want to show the video when someone has a normal Internet connection speed on their phone (with WiFi). If at that time someone has a slow (non-WiFi) Internet connection, I want to show the photo instead. Thus, the user does not need to upload a 30-megabyte video file with his attempt to connect and eliminate the bandwidth limit of his provider. I prefer a client solution with jQuery / Javascript or a server with PHP, if possible.

+5
source share
1 answer

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

The estimated speed will depend on the ability to connect to the server, so it is not so accurate, but it can give you a great idea. You can display a photo when the result is below a certain value.

0
source

All Articles