API16:JLDAP/ipToNetAddress
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Converts a dot notation IP address to net address (e.g. for Netware, etc)
Description:JLDAP/ipToNetAddress
Syntax
ipToNetAddress($ip)
| Parameter Name | Default Value | Description |
|---|---|---|
| $ip | IP Address (e.g. xxx.xxx.xxx.xxx) |
Returns
string Net address public
Defined in
libraries/joomla/client/ldap.php
Importing
jimport( 'joomla.client.ldap' );
Source Body
function ipToNetAddress($ip) { $parts = explode('.', $ip); $address = '1#'; foreach ($parts as $int) { $tmp = dechex($int); if (strlen($tmp) != 2) { $tmp = '0' . $tmp; } $address .= '\\' . $tmp; } return $address; }
[Edit See Also] SeeAlso:JLDAP/ipToNetAddress
Examples
<CodeExamplesForm />
