Re: how to check REMOTE_ADDR to see if it contains PART of an ip

From: Date: Wed, 16 Jan 2002 18:58:16 +0000
Subject: Re: how to check REMOTE_ADDR to see if it contains PART of an ip
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80792@lists.php.net to get a copy of this message
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 of the string was true i guess... i dunno. anyone else got another function in mind? --- "bvr@xs4all.nl" <bvr@xs4all.nl> wrote: > > > strncmp() > > MANUAL! > > bvr. > > > On Wed, 16 Jan 2002 10:41:51 -0800 (PST), Police > Trainee wrote: > > >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... any help please? > >the php site is only helpful to me if i know which > >function i wish to look up by name. > > > >in a nutshell: > >if ("150.200.250.x" is within > >$REMOTE_ADDR){dowhatever} > > > >thanks! > > > >__________________________________________________ > >Do You Yahoo!? > >Send FREE video emails in Yahoo! Mail! > >http://promo.yahoo.com/videomail/ > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: > php-general-unsubscribe@lists.php.net > >For additional commands, e-mail: > php-general-help@lists.php.net > >To contact the list administrators, e-mail: > php-list-admin@lists.php.net > > > > > > > __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/

« previous php.general (#80792) next »