Feedback for these lessons is very much welcome. If you like or hate something about a lesson let us know, either on GitHub, via Mail or just tell us in person :)
x
On the client side of the internet
Implementing your own version of ping
Take a url as input.
In a loop try to establish a connection to a website every n seconds (30 is recommended). In the world of web pages, you always want to get Status: 200
back when reaching out to a server.
If you get Status 200 back terminate, otherwise print the status code and keep going. Note that you can terminate your script with Ctrl + C
anytime.
To try your script on a not working webpage, you can use something like http://whbfuwvfbiuwe.github.com
.1
-
You should know enough web pages that work as expected. ;-) ↩