Very good thank you 😉)
That is a great function.
What I would like to do now is this:
1.) check the URL if the syntax is correct using regex.
2.) check wheter the domain exists by trying to get a host lookup for the domain.
3.) try to connect to the site seing if it is up and if I get a valid file or a 404 using your function
4.) checking if the file exists for example
http://www.you.net/index.html
Thank oyu very much, if anyone has other suggestions, let me know. I plan on making this publically available