You appear to be a bot. Output may be restricted
Description
Tests if this is a private IPURL | Expected IP | Private? |
---|---|---|
localhost | 127.0.0.1 | No |
q.w | 127.0.0.1 | No |
qw | 192.168.x.x | Yes |
Usage
Tests_libs_class_oik_remote::test_are_you_private_ip();
Parameters
Returns
voidSource
File name: oik-libs/tests/test-libs-class-oik-remote.phpLines:
1 to 9 of 9
function test_are_you_private_ip() { $local = oik_remote::are_you_private_ip( "https://localhost" ); $this->assertFalse( $local ); $local = oik_remote::are_you_private_ip( "https://qw" ); $this->assertTrue( $local ); $local = oik_remote::are_you_private_ip( "https://q.w" ); $this->assertFalse( $local ); }View on GitHub