Re: [PHP] Fast search

2006-05-17 Thread Evan Priestley
You can make a pretty effective time/memory tradeoff -- particularly if your array of patterns is relatively fixed -- but unless you re- implement this in C, it will probably be slower than a brute force approach with the str* functions unless you are searching for a fairly huge number of ne

Re: [PHP] New Help with Javascript Navigation

2006-04-26 Thread Evan Priestley
" again carefull with quotes") ."more html stuff here"); // end of echo statement ------- snip -- Warren -Original Message- From: Evan Priestley [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 26, 2006 1:47 PM To: Warren

Re: [PHP] New Help with Javascript Navigation

2006-04-26 Thread Evan Priestley
Tell you what: write file_get_contents() in Javascript, and I'll write the rest of it. Evan On Apr 26, 2006, at 4:36 PM, Warren Vail wrote: This brings up a reoccurring issue for me and I'd be interested if anyone else has given it any thought. PHP appears to me to be incomplete unless it

Re: [PHP] Filter out MS Word 'quotes' for RSS

2006-04-26 Thread Evan Priestley
On Apr 26, 2006, at 5:45 AM, Kevin Davies wrote: Obviously I need to convert these on entry, or on output into RSS. Does anyone know of an easy way to do this, or is it a case of identifying each unusual character individually? These high-ascii characters have ord() values greater than 12

Re: [PHP] newbie question

2006-04-05 Thread Evan Priestley
On Apr 5, 2006, at 11:41 AM, Jay Blanchard wrote: ^ Not sure if this is just a transcription error, but that should be an 'l' (ell), not a '1' (one) in "nl2br". Evan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] protecting passwords when SSL is not available

2006-03-28 Thread Evan Priestley
nd, since unique_ids don't repeat, there is no chance that you have ever sniffed the password hashed with that unique_id. Satyam - Original Message ----- From: "Evan Priestley" <[EMAIL PROTECTED]> To: "Satyam" <[EMAIL PROTECTED]> Cc: Sent: Mond

Re: [PHP] protecting passwords when SSL is not available

2006-03-27 Thread Evan Priestley
on to spoofing. Anyway, this is a poor man replacement for SSL, with limitations, but it is good to know what are those limitations. Thanks for your help Satyam - Original Message - From: "Evan Priestley" <[EMAIL PROTECTED]> To: "Satyam" <[EMAIL PROT

Re: [PHP] protecting passwords when SSL is not available

2006-03-27 Thread Evan Priestley
This is called a "nonce"[1], and the method you've described will give you marginally less awful security than submitting a plaintext password or an unadulterated hash of the password, but, obviously, is in no way a substitute for real SSL. For instance, if this password puts the session in

Re: [PHP] Letters in Loops

2006-03-23 Thread Evan Priestley
On Mar 23, 2006, at 10:08 AM, Ben Miller wrote: In trying to make an alpha list, using the following: for($i=A;$i<=Z;$i++) { echo "$i"; } Produces: A B C... X Y Z AA AB AC... AX AY AZ... all the way to YZ. What am I doing wrong that it's not stopping at just plain old "Z", witho

Re: [PHP] gettting last assigned key in an array

2006-02-10 Thread Evan Priestley
function get_last_key( $array ) { // end( $array ); return key( $array ); return array_search( reset( array_reverse( array_values( array_flip( $array ) ) ) ) ,array_reverse( array_values( array_flip( $array ) ) ) ,true

Re: [PHP] Need help with for loop, pulling MySQL data, completely lost

2005-08-21 Thread Evan Priestley
Dan, When you run the second query ("$query1"), its results overwrite the results of your first query ("$query0"). `mysql_fetch_assoc()' returns results from the _most recent_ query, so after the first iteration, the call to `mysql_fetch_assoc()' is returning results from `query1', not fr