\JCORE\TRANSPORT\HTTPHTTP_UTIL

Class HTTP_API

Summary

Methods
Properties
Constants
__construct()
get_ip_address()
validate_ip()
get_tld()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() : \JCORE\TRANSPORT\HTTP\return

DESCRIPTOR:

Returns

\JCORE\TRANSPORT\HTTP\return —

bool NULL

get_ip_address()

get_ip_address() : string

lifted directly from http://blackbe.lt/advanced-method-to-obtain-the-client-ip-in-php/ implementation needs an update for IPV6 addresses

Retrieves the best guess of the client's actual IP address. Takes into account numerous HTTP proxy headers due to variations in how different ISPs handle IP addresses in headers between hops.

Returns

string —

serverIP

validate_ip()

validate_ip(string  $ip) : boolean

Ensures an ip address is both a valid IP and does not fall within a private network range.

Parameters

string $ip

Returns

boolean

get_tld()

get_tld(  $url) : string

gets a top level domain from a url

Parameters

$url

Returns

string —

tld