Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NMC-PHP-Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UNL Information Services
NMC-PHP-Framework
Commits
2c51e2e0
Commit
2c51e2e0
authored
16 years ago
by
Tim Steiner
Browse files
Options
Downloads
Patches
Plain Diff
More case sensitivity crap
parent
2fa4a2c0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
library/Nmc/Ipaddress.php
+0
-37
0 additions, 37 deletions
library/Nmc/Ipaddress.php
with
0 additions
and
37 deletions
library/Nmc/Ipaddress.php
deleted
100644 → 0
+
0
−
37
View file @
2fa4a2c0
<?php
class
Nmc_IpAddress
{
static
public
function
binaryToString
(
$hexIP
)
{
$address
=
array
();
for
(
$i
=
0
;
$i
<
4
;
$i
++
)
{
$address
[]
=
hexdec
(
bin2hex
(
$hexIP
[
$i
]));
}
$address
=
implode
(
'.'
,
$address
);
return
$address
;
}
static
public
function
intToString
(
$intIP
)
{
$address
=
array
();
for
(
$i
=
3
;
$i
>=
0
;
$i
--
)
{
$address
[]
=
(
$intIP
>>
(
$i
*
8
))
&
0x000000FF
;
}
$address
=
implode
(
'.'
,
$address
);
return
$address
;
}
static
public
function
stringToInt
(
$stringIP
)
{
$stringIP
=
explode
(
'.'
,
$stringIP
);
$address
=
0
+
(
intval
(
$stringIP
[
0
])
<<
24
)
+
(
intval
(
$stringIP
[
1
])
<<
16
)
+
(
intval
(
$stringIP
[
2
])
<<
8
)
+
(
intval
(
$stringIP
[
3
])
<<
0
);
return
$address
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment