Ron Piggott wrote:
> How do I determine the value oftx from this string?
>
>
> page/words_from_the_well_checkout/?tx=8UM53005HH344951T&st=Completed&amt=0.01
>
> My desired answer is: 8UM53005HH344951T
>
> I am trying to capture the serial number which follows tx= and ends
> immediately be
zerof wrote:
revDAVE escreveu:
Hello All,
I'm a newbie.
My server just upgraded to PHP version 5.1.2 from php 4.3.11
MySQL currently is v 4.0.27
Q: What is the oldest - best/safest version of mySQL to use with PHP
version
5.1.2.? The reason I mentioned the oldest - is because, for legacy
revDAVE escreveu:
Hello All,
I'm a newbie.
My server just upgraded to PHP version 5.1.2 from php 4.3.11
MySQL currently is v 4.0.27
Q: What is the oldest - best/safest version of mySQL to use with PHP version
5.1.2.? The reason I mentioned the oldest - is because, for legacy clients,
I would
Ryan A wrote:
> Hey, I have a old htpasswd file with a lot of logins in this format:
>
> test:dGRkPurkuWmW2 (test:test) test1:dGlAW3zdxeAG2 (test1:test1)
>
> now I have a login form what takes a POST "user" and a POST "pw"...
> but if you look at my above first example login.. the username and
>
On Sat, 3 Feb 2007 12:58:19 -0500, tedd wrote:
> At 5:09 PM + 2/3/07, Wikus Moller wrote:
>>Hi.
>>
>>I want to know if anyone can help me with my code which matches a
>>number to a range e.g. 1-15 and echoes an image if the number is in
>>the range.
>>
>>The code would use the if statement and
Russell P Jones wrote:
Im trying to count the number of times a word occurs in a string - is the
only way to do this preg_match_all?
Russ Jones
No, there are hundreds of other ways; but, preg_match_all() is probably
the easiest.
$number= preg_match_all("%$word%sm", $string, $matches);
--
PHP Gen
* and then Greg Donald declared
> On Sun, 31 Oct 2004 12:58:04 +0100, Nick Wilson <[EMAIL PROTECTED]> wrote:
> > I think in_array() sounds like a great solution, wonder if it's faster
> > than comparing each ooe with == ? thanks!
>
> Benchmark it both ways and find out. Then post back and te
On Sun, 31 Oct 2004 12:58:04 +0100, Nick Wilson <[EMAIL PROTECTED]> wrote:
> I think in_array() sounds like a great solution, wonder if it's faster
> than comparing each ooe with == ? thanks!
Benchmark it both ways and find out. Then post back and tell us. :)
--
Greg Donald
Zend Certified Eng
* and then Daniel Schierbeck declared
> I'd rather go with something like this:
>
> $banned_ips = array('123.123.123.123', '321.321.321.321'); // Banned IPs
>
> if (in_array($_SERVER['REMOTE_ADDR'], $banned_ips)) {
> die('Dude, you\'re banned!');
> }
>
> But if I were you I'd choose s
* and then Per Jessen declared
> foreach($ips as $ip) {
> preg_match("/^$ip$/", $_SERVER[REMOTE_ADDR]);
> $ban = TRUE;
> }
Great! - found a more sutable way but that's appreciated. Cheers!
--
Nick W
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.ph
* and then Aidan Lister declared
> I cannot fathom why you would use preg_match for this.
>
> This will get an "exact match"...
> if ($ip == $_SERVER[REMOTE_ADDR]) { $ban = true; }
Ahh.. an oversight. The script has been cobbled together from a previous
version that supported partial matches
Daniel Schierbeck wrote:
Nick Wilson wrote:
hello all
I am foreach()ing through an array of ip addresses in a 'ban script' and
have the following php code:
foreach($ips as $ip) {
preg_match("/$ip/", $_SERVER[REMOTE_ADDR]);
$ban = TRUE;
}
This is great, but if 127.0.0 were in the ban list (for e
Nick Wilson wrote:
hello all
I am foreach()ing through an array of ip addresses in a 'ban script' and
have the following php code:
foreach($ips as $ip) {
preg_match("/$ip/", $_SERVER[REMOTE_ADDR]);
$ban = TRUE;
}
This is great, but if 127.0.0 were in the ban list (for example) it
would still pr
I cannot fathom why you would use preg_match for this.
This will get an "exact match"...
if ($ip == $_SERVER[REMOTE_ADDR]) { $ban = true; }
Despite this being the worst idea I've ever seen, combined with a true lack
of understanding, I wish you well.
"Nick Wilson" <[EMAIL PROTECTED]> wrote in
Nick Wilson wrote:
> hello all
>
> I am foreach()ing through an array of ip addresses in a 'ban script' and
> have the following php code:
>
> foreach($ips as $ip) {
> preg_match("/$ip/", $_SERVER[REMOTE_ADDR]);
> $ban = TRUE;
> }
>
> This is great, but if 127.0.0 were in the ban list (for
That's great, thanks David :-)
For anyone who is interested I also got some helpful responses in,
news://comp.ai.fuzzy
Cheers
James
"David Robley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> says...
> > Hello
> >
> > Does anyo
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...
> Hello
>
> Does anyone know of an algorithm or program for matching pieces of text
> (such as film titles) that are conceptually the same, but which may be
> written/spelled differently?
>
> eg. I need something which will identify a (li
17 matches
Mail list logo