Hi there,
thank you so much for your reply and indeed, that was the way I thought it would work, but my task is a little more complicated.
Essentially this is what I have to do. I need to host a page on the world wide web that detects the IP range of all our users and redirects them accordingly. To identity our users we need to check for our Subnet IP address - essentially the network address.
What is needs to do is point everyone using our VPN or internal to our building (that has a subnet address in the 10.0.0.0 range) and point them to our intranet page, hosted at say
http://intranet (if you are in the building or using the VPN) and everyone one else, not on our VPN and external to our building to say
Google. This is for all our remote users that will have our Intranet address set as their browsers homepage.
So while it's possible to list every IP address on our subnet, it would take me a year to list them all

so hence the need to cover the entire range in one look up.
I'm sure it is possible, as I would imagine this is how country detection is done, over a range of IPs. That's what the very first script at the top of this post seemed to work as it was identifying our subnet/network address.
Thank you so much for your help thus far, all of this is really helpful and the tests I'm running through are helping me understand how this thing works. I'm no developer and am just trying to do the best I can and any help is fantastic support.
Look forward to hearing soon.