yeah, like strpos() you still could have gotten from the manual.
strncmp() does it exactly, like strpos() but only searches the beginning,
note that it returns false for matching strings for use in some sorting functions.
bvr.
On Wed, 16 Jan 2002 10:58:16 -0800 (PST), Police Trainee wrote:
At 10:58 AM 1/16/2002 -0800, Police Trainee wrote:
> > >in a nutshell:
> > >if ("150.200.250.x" is within
> > >$REMOTE_ADDR){dowhatever}
There are a couple of different ways to accomplish this. One is:
if (strpos($REMOTE_ADDR,"150.200.250.") !== false) {
//do whatever
}
You have to be caref
nah, there's another one that you don't have to
speficy the length. i remember seeing it used once
when checking the user's browser to see if the string
"mozilla" was contained within the variable...
besides, i changed the string to check for by one
digit and it still returned true because PART o
hello. i am trying to write a simple php line that
checks the REMOTE_ADDR variable and see if it comes
from a specific netblock (to see if A.B.C is contained
in a REMOTE_ADDR of A.B.C.D) But how do i do this?
i know there is a php function that checks the string
for the presence of another one...
4 matches
Mail list logo