[PHP] OR

2004-04-25 Thread Aidan Lister
if (cond || cond2) OR if (cond OR cond2) What do you use, and why? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OR

2004-04-25 Thread daniel
if (cond || cond2) OR if (cond OR cond2) What do you use, and why? -- || coz its easier to type ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OR

2004-04-25 Thread Evan Nemerson
On Sunday 25 April 2004 12:14 am, Aidan Lister wrote: if (cond || cond2) OR if (cond OR cond2) What do you use, and why? Doesn't matter- personal preference. -- Evan Nemerson [EMAIL PROTECTED] http://coeusgroup.com/en -- There is a certain right by which we may deprive a man of life,

Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Evan Nemerson
On Saturday 24 April 2004 10:29 pm, Tim Traver wrote: Hi all, ok, this may be a dumb question, but I have a page that has server side includes that include a php script like this : !--#include virtual=schedule.php -- works fine, except the script doesn't appear to receive any of the query

[PHP] Re: OR

2004-04-25 Thread Rainer Müller
Aidan Lister schrieb: if (cond || cond2) OR if (cond OR cond2) What do you use, and why? It doesn't matter except you combine it because || has a higher priority as OR. Rainer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Burhan Khalid
Tim Traver wrote: Hi all, ok, this may be a dumb question, but I have a page that has server side includes that include a php script like this : Please send a new message if you have a new question, and do not reply to a thread and change the subject. It breaks the conversation flow. Where is

Re: [PHP] Fetching XML for parsing

2004-04-25 Thread Burhan Khalid
Patagonia Hosting Development Group wrote: That may be the exact problem. I was not figuring that one out. Thi is my fopen and XML parser code: $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, startElement, endElement); xml_set_character_data_handler($xml_parser,

Re: [PHP] SMTP and GroupWise

2004-04-25 Thread Burhan Khalid
Todd Cary wrote: My client is using GroupWise to relay *without* having relay turned on and it needs/uses an authenication that is different from the regular SMTP. Here is a trace of a message that went through: [ snipped POP before SMTP authentication ] Does anyone know of a class that can

[PHP] PHP /MySQL problem on SMP machines

2004-04-25 Thread Lasse Laursen
Hi all, We just installed PHP 4.3.6 on FreeBSD 5.2.1 on some SMP machines and we are experiencing some weird problems. The PHP processes are running as FastCGI under Zeus with these compile options: ./configure --with-curl \ --enable-sockets \ --enable-dbx \ --with-jpeg-dir \ --with-jpeg \

Re: [PHP] Fetching XML for parsing

2004-04-25 Thread Patagonia Hosting Development Group
I used to have the r alone but I thought on trying... and nothing... Burhan Khalid [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Patagonia Hosting Development Group wrote: That may be the exact problem. I was not figuring that one out. Thi is my fopen and XML parser code:

Re: [PHP] OR

2004-04-25 Thread -{ Rene Brehmer }-
According to historical records, on Sun, 25 Apr 2004 17:14:13 +1000 Aidan Lister wrote about [PHP] OR: if (cond || cond2) OR if (cond OR cond2) What do you use, and why? I always use || basically because to me it's easier to read in more complex statements ... like this: if ((($del_own

[PHP] adult content censoring

2004-04-25 Thread Andy B
hi... i have to make an adult content censoring system so people cant post bad words on any public viewable posts. i know preg_replace and possibaly preg_match would be a huge help but im wondering how i would put all the bad words in a file (textfile) 1 word on a line and have it look through

Re: [PHP] adult content censoring

2004-04-25 Thread Richard Davey
Hello Andy, Sunday, April 25, 2004, 3:22:29 PM, you wrote: AB i have to make an adult content censoring system so people cant post bad AB words on any public viewable posts. i know preg_replace and possibaly AB preg_match would be a huge help but im wondering how i would put all the bad AB words

Re: [PHP] OK SQL experts...

2004-04-25 Thread Daniel Clark
I think you want to remove the single quotes around the field names. SELECT * FROM my_table WHERE (field_1 LIKE '%$keyword%' OR field_2 LIKE '%$keyword%' OR field_3 LIKE '%$keyword%') AND status = 'active'; I STFW and RTFM and I still can't figure out why this returns a 1064 parse error:

Re: [PHP] OK SQL experts...

2004-04-25 Thread Daniel Clark
The parenthesis are OK. The query might take a long time to run with 3 LIKE statements. Backticks, single quotes, or nothing at all makes no difference. I believe the parsing error is due to my parentheses or AND/OR structure. Any thoughts on that? On Apr 23, 2004, at 8:32 AM, John W.

[PHP] Shared session ? (frames application)

2004-04-25 Thread Richard A. DeVenezia
I am wondering if it is possible to let two or more scripts share a common session id ? I am guessing not, but would like to be proved wrong. This is the situation cut down about as small as I could make it. Five files: index.php, login-form.inc, frames.inc, left.php, main.php index.php - ?

Re: [PHP] adult content censoring

2004-04-25 Thread Richard A. DeVenezia
Richard Davey wrote: and that's it - I pass any string I need to this whenever someone posts a message, subject, etc etc and it hasn't failed me yet :) (unless the bad word isn't in your list of course!) To guard against 'lame' impressions of words to be filtered, you might also check all

Re: [PHP] adult content censoring

2004-04-25 Thread Curt Zirzow
* Thus wrote Richard Davey ([EMAIL PROTECTED]): Hello Andy, Sunday, April 25, 2004, 3:22:29 PM, you wrote: AB i have to make an adult content censoring system so people cant post bad AB words on any public viewable posts. i know preg_replace and possibaly AB preg_match would be a huge

Re: [PHP] Shared session ? (frames application)

2004-04-25 Thread Marek Kilimajer
Richard A. DeVenezia wrote: I am wondering if it is possible to let two or more scripts share a common session id ? I am guessing not, but would like to be proved wrong. I might get you wrong, but unless you take some precausions all scripts on a single domain share common session id. -- PHP

Re: [PHP] PHP /MySQL problem on SMP machines

2004-04-25 Thread Curt Zirzow
* Thus wrote Lasse Laursen ([EMAIL PROTECTED]): Hi all, We just installed PHP 4.3.6 on FreeBSD 5.2.1 on some SMP machines and we are experiencing some weird problems. ... The database backend is MySQL 4.0.18 and is run on a seperate dedicated server. What mysqlclient is php linked to?

Re: [PHP] Call to external function

2004-04-25 Thread Marek Kilimajer
Jeff McKeon wrote: No... PHP and JavaScript are executing at different time and at different place. Besides, they are executed by different programs. Are you trying to measure execution time of a query?? Look at: http://www.php.net/microtime No, I'm trying to get a little animation on the

Re[2]: [PHP] adult content censoring

2004-04-25 Thread Richard Davey
Hello Curt, Sunday, April 25, 2004, 4:28:37 PM, you wrote: CZ Also instead of str_replace scanning the whole string 5 time to CZ replace the 5 items, its only scanned once, replacing up to five CZ things. My method *did* only scan the string once and str_replace is definitely faster than

Re: [PHP] adult content censoring

2004-04-25 Thread Curt Zirzow
* Thus wrote Richard Davey ([EMAIL PROTECTED]): Hello Curt, Sunday, April 25, 2004, 4:28:37 PM, you wrote: CZ Also instead of str_replace scanning the whole string 5 time to CZ replace the 5 items, its only scanned once, replacing up to five CZ things. My method *did* only scan the

Re: [PHP] OR

2004-04-25 Thread Red Wingate
BEEP wrong :) http://www.php.net/manual/en/language.operators.php#language.operators.precedence therefore: $a AND $b OR $c AND $d is not equal $a AND $b || $c AND $d but is equal to $a $b || $c $d -- red Evan Nemerson wrote: On Sunday 25 April 2004 12:14 am, Aidan Lister wrote: if

Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Tim Traver
Yes, I mean that php gets the server information for the request, but it doesn't get the QUERY_STRING variable. But it does get the UNESCAPED_QUERY_STRING variable...wierd, huh ? It might be that apache isn't sending that variable to php from an included file...not sure... That's why I'm

[PHP] Re: Shared session ? (frames application)

2004-04-25 Thread Torsten Roehr
This is possible without problem. Just start your session in every script and forward the session id from your frameset (which is probably the first page to be called by the user) to each frame: frames.inc -- ? // start session here // ... frameset cols=350,* rows=* frameborder=1

php-general Digest 25 Apr 2004 17:27:52 -0000 Issue 2726

2004-04-25 Thread php-general-digest-help
php-general Digest 25 Apr 2004 17:27:52 - Issue 2726 Topics (messages 184546 through 184574): SSI and query string variables to PHP 184546 by: Tim Traver 184547 by: Tim Traver 184552 by: Evan Nemerson 184554 by: Burhan Khalid 184573 by: Tim Traver

Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Evan Nemerson
On Sunday 25 April 2004 09:56 am, Tim Traver wrote: Yes, I mean that php gets the server information for the request, but it doesn't get the QUERY_STRING variable. But it does get the UNESCAPED_QUERY_STRING variable...wierd, huh ? Yeah, especially since I've never heard of

Re: [PHP] PHP /MySQL problem on SMP machines

2004-04-25 Thread Lasse Laursen
Hi Curt, Thanks for your email - please find answers below: Regards -- Lasse Laursen · VP, Hosting Technology · NetGroup A/S St. Kongensgade 40H · DK-1264 Copenhagen K, Denmark Phone: +45 3370 1526 · Fax: +45 3313 0066 - Don't be fooled by cheap finnish imitations - BSD is the One True Code

[PHP] PHP 5 and interfaces

2004-04-25 Thread Brandon Goodin
I am looking to port some java code to PHP. I am looking at interfaces in PHP 5 and wondering if they support 'interface . extends .'. For example I have interface C and it extends Interface A and B.. ?php interface C extends A, B { . } ? Thanks, Brandon

Re: [PHP] OR

2004-04-25 Thread Marco Schuler
Hi Am So, 2004-04-25 um 16.00 schrieb -{ Rene Brehmer }-: According to historical records, on Sun, 25 Apr 2004 17:14:13 +1000 Aidan Lister wrote about [PHP] OR: [...] || |! ! ^ being OR, AND, NOR, and NAND (believe NOR is actually called XOR, can't remember ...) Just to help your mind:

Re: [PHP] adult content censoring

2004-04-25 Thread Ryan A
Depends on how badly the person wants to use adult languageevery bad words filter can be bypassed unless you are the filter. E.g: you screen the comments before allowing or disallowing it... My $0.2 Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] php mail() scaleability

2004-04-25 Thread Josh Klobe
Using mail($to, $subject, $content, $headers) takes way too long when attempting to mail to 30k people. This seems to be a result of a socket being opened for each send. Is there a better way to approach this situation via php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] substrings

2004-04-25 Thread David T-G
Hi, all -- I must be having a brain fart as well as going blind because I can't find in the manual how to do this. Given a string like #AABBCC or #112233 how do I get the 2nd-3rd 4th-5th 6th-7th position substrings so I can break out the red, green, and blue values? All of the regular

[PHP] Re: php mail() scaleability

2004-04-25 Thread Manuel Lemos
Hello, On 04/25/2004 04:18 PM, Josh Klobe wrote: Using mail($to, $subject, $content, $headers) takes way too long when attempting to mail to 30k people. This seems to be a result of a socket being opened for each send. Is there a better way to approach this situation via php? Under Unix/Linux,

Re: [PHP] substrings

2004-04-25 Thread Richard Harb
$color = '#aabbcc'; if (strlen($color) == 7) { echo ' r: ' . substr($color, 1, 2); echo ' g: ' . substr($color, 3, 2); echo ' b: ' . substr($color, 5, 2); } elseif (strlen($color) == 4) { echo ' r: ' . str_repeat(substr($color, 1, 1), 2); echo ' g: ' . str_repeat(substr($color, 2,

[PHP] substr == SOLVED (was Re: [PHP] substrings)

2004-04-25 Thread David T-G
Richard, et al -- ...and then Richard Harb said... % % $color = '#aabbcc'; % % if (strlen($color) == 7) { %echo ' r: ' . substr($color, 1, 2); [snip] D'oh! I knew it should be substr but I could never find it! I was up to page 1098 or such and muddling through all of the PCRE doc when I

Re: [PHP] Re: php mail() scaleability

2004-04-25 Thread Travis Low
Manuel Lemos wrote: Hello, On 04/25/2004 04:18 PM, Josh Klobe wrote: Using mail($to, $subject, $content, $headers) takes way too long when attempting to mail to 30k people. This seems to be a result of a socket being opened for each send. Is there a better way to approach this situation via

RE: [PHP] Fetching XML for parsing

2004-04-25 Thread Jason Sheets
rb is correct, b should be used to ensure portability between operating systems with different line endings. Quoted from http://us2.php.net/fopen For portability, it is strongly recommended that you always use the 'b' flag when opening files with fopen() Jason -Original Message- From:

Re: [PHP] SSI and query string variables to PHP

2004-04-25 Thread Tim Traver
Hmmm after doing more research on it, it appears that this server variable only appears in SSI documents. And I didn't quote the variable correctly, its QUERY_STRING_UNESCAPED I guess that SSI does not send through the querystring to the included script. I might have to just use the

Re: [PHP] substrings

2004-04-25 Thread Evan Nemerson
On Sunday 25 April 2004 01:00 pm, David T-G wrote: Hi, all -- I must be having a brain fart as well as going blind because I can't find in the manual how to do this. Given a string like #AABBCC or #112233 how do I get the 2nd-3rd 4th-5th 6th-7th position substrings so I can break

Re: [PHP] Re: php mail() scaleability

2004-04-25 Thread Manuel Lemos
Hello, On 04/25/2004 05:43 PM, Travis Low wrote: Using mail($to, $subject, $content, $headers) takes way too long when attempting to mail to 30k people. This seems to be a result of a socket being opened for each send. Is there a better way to approach this situation via php? Under

RE: [PHP] Re: php mail() scaleability

2004-04-25 Thread Jason Sheets
Take a look at the Mail Queue class from PEAR, it enables you to put mail in the Queue instead of real time delivery. http://pear.php.net/packages.php?catpid=14catname=Mail Jason -Original Message- From: Travis Low [mailto:[EMAIL PROTECTED] Sent: Sunday, April 25, 2004 2:43 PM To:

Re: [PHP] Re: php mail() scaleability

2004-04-25 Thread Manuel Lemos
Hello, On 04/25/2004 06:03 PM, Jason Sheets wrote: Take a look at the Mail Queue class from PEAR, it enables you to put mail in the Queue instead of real time delivery. http://pear.php.net/packages.php?catpid=14catname=Mail This is a bit of an overkill as it attempts to provide an inefficient