Ron Piggott wrote:
How do I determine the value oftx from this string?
page/words_from_the_well_checkout/?tx=8UM53005HH344951Tst=Completedamt=0.01
My desired answer is: 8UM53005HH344951T
I am trying to capture the serial number which follows tx= and ends
immediately before the
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
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
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
pass are
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 check if a
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
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
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 example) it
would still
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
* 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. I'd
* 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:
* 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 something
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
* 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 tell us.
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 anyone know of an
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 (likely to
17 matches
Mail list logo