@sergerdn
Thank a lot!
Its not excatcly what I looked for but based on your code I made a few changes and have a working solution now:
How to check if I have internet?
-
I run 200 threads + and I use GET status of a certain website. if status returned 200 (that means website online) then means i have internet i can continue script.
if i dont do this my scripts will continue without net and they will waste resources that I gathered
problem with my approach is that it constantly connects to that website 50times per sec.. it will get IP ban sooner or later.
how to deal with it?
-