Hello, in this video, I'm going to show you how to validate an IP version six, you know address and I've got an example right here, discovery of the internet, you don't know what this address actually refers to. But if you need, you know, to validate is really simple. First of all, we will need to store the address that we're validating in something called the IP address. Equals should and you want to add a string to clipboard. Next, what you want to do is we'll check the IP filter on the scope var, then you specify the address that you want to check. You could get it from the user, you could, you know, use a PHP feature to get it you know from the current website.
You know, there's a bunch of stuff that you could do to be able to get a filter on the school validate and wanting it IP one and Next, we need to say The filter on the score flag, probably faster to type it flag on the score IP version six, because just in case you're using IP version four, so this is actually, you know, applicable for IP version four, you know IP addresses as well if you want to do that. And that's it. That's literally all there is to it. So if I bring here echo valid IP version six, and I'll just do an else that's invalid. Invalid IP version six. Okay, so on.
Secondly, to put that on. I'm sorry, run that. We got invalid address. Okay, that's interesting. It does not like it. Okay, so let's see what's gone wrong here.
Of course. Version six four is technically in our version four address. It's a version six address. There we go valid address. And let's say for that that's also valid. Why if I did this?
No, that wouldn't be valid. There we go. It's not valid because it uses the hexadecimal system. So that's it. That's how you validate an IP version six address. If you have any questions, feel free to pop me a message.
You know where I am. And as usual, I look forward to seeing you in the next video.