php-general Digest 6 Jul 2011 13:31:50 -0000 Issue 7392

2011-07-06 Thread php-general-digest-help
php-general Digest 6 Jul 2011 13:31:50 - Issue 7392 Topics (messages 313932 through 313947): Re: vend-bot? 313932 by: Kirk Bailey 313947 by: Stuart Dallas Re: Top Posting 313933 by: Jim Giner 313934 by: Daniel Brown 313936 by: Lester Caine

[PHP] Self-whitelisting (WAS: Top Posting)

2011-07-06 Thread George Langley
On 2011-07-05, at 8:52 PM, Jim Giner wrote: Huh? You have a problem with a person having a spam filter that requires one valid response to ensure that the mail from an address is from a real person ONE TIME ONLY? -- I know that I do. I monitor our web site's registration

Re: [PHP] Re: Top Posting

2011-07-06 Thread Lester Caine
Tamara Temple wrote: And then, we have the case of a signature being 3 times as long as the reply Which is less of a problem if the email client correctly trims it! I can probably come up with a list of posts just to this list where a top poster has included several signatures several

[PHP] static variables inside static methods

2011-07-06 Thread Дмитрий Степанов
Hello, everybody. While working with static variables inside static class' methods, I have found this very interesting (at least for me) behavior of PHP. Consider the following class definitions (example #1): class X { public final static function test() { static $i; return ++$i; } } class Y

Re: [PHP] static variables inside static methods

2011-07-06 Thread Andrew Williams
I think you are confusing scope visibility level of the variable within method and the class. Variable within the method is going to 1 because it was declare within the test method and there no link to the one declared outside the test method. The second case is referencing the varible of the

[PHP] Re: Installing PHP

2011-07-06 Thread David Robley
Jim Giner wrote: Eureka! The whole problem was my unfamiliarity with the php download page. To others - read the choices there very carefully (which I thought I did!) to be sure you get the thread-safe version. Thanks to all who contributed, but David gets the kudos for telling me to

RE: [PHP] Top Posting

2011-07-06 Thread Ford, Mike
On 2011-07-05, Stuart Dallas penned the words: On Tue, Jul 5, 2011 at 3:29 PM, ad...@buskirkgraphics.com wrote: Anyone know how to make Outlook changes its reply position. Google delivers... http://sourceforge.net/apps/mediawiki/macros4outlook/index.php?title =QuoteFix_Macro Many thanks

[PHP] Constants in strings

2011-07-06 Thread Dave Wilson
Hi all, OK. We all know that constants cannot be accessed directly via their name in double-quoted or heredoc strings. I knew this already but a read of the PHP manual got me thinking. The manual states that to get the $$ value of a variable, the form {${var}} should be used. Therefore, I

RE: [PHP] Foreach question

2011-07-06 Thread Dajka Tamás
And that's exactly how I did it :) Since 'for' is traditionally pre-testing with excetuting the condition prior looping it's working well :) Thanks for all the help! Cheers, Tamas -Original Message- From: Louis Huppenbauer [mailto:louis.huppenba...@gmail.com] Sent: Tuesday,

Re: [PHP] Constants in strings

2011-07-06 Thread Curtis Maurand
On 7/6/2011 7:07 AM, Dave Wilson wrote: Output - {XYZ} Attempt 2: ?php define ('XYZ','ABC'); echo {{XYZ}}\n; ? Output - {{XYZ}} No luck there. I did encounter one oddity though: ?php define ('XYZ','ABC'); echo {${XYZ}}\n; ? Output: PHP Notice: Undefined variable: ABC in

Re: [PHP] Constants in strings

2011-07-06 Thread Stuart Dallas
On Wed, Jul 6, 2011 at 12:07 PM, Dave Wilson dai_bac...@hotmail.com wrote: Hi all, OK. We all know that constants cannot be accessed directly via their name in double-quoted or heredoc strings. I knew this already but a read of the PHP manual got me thinking. The manual states that to get

Re: [PHP] Constants in strings

2011-07-06 Thread Ashley Sheridan
Any ideas? echo XYZ . \n; --Curtis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Which doesn't answer the original question Dave asked... Thanks, Ash http://www.ashleysheridan.co.uk -- Sent from my Android phone with K-9 Mail.

[PHP] Re: Constants in strings

2011-07-06 Thread Geoff Lane
On Wednesday, July 6, 2011, Dave Wilson wrote: OK. We all know that constants cannot be accessed directly via their name in double-quoted or heredoc strings. FWIW, this looked like it might be a right royal PITA for me ATM. However, I've got a work-around. With about a dozen scripts written

Re: [PHP] vend-bot?

2011-07-06 Thread Stuart Dallas
On Wed, Jul 6, 2011 at 3:01 AM, Kirk Bailey kbai...@howlermonkey.netwrote: On 7/3/2011 4:53 PM, Stuart Dallas wrote: Only allowing them to access the URL once is a bad idea. If their download fails, is corrupt, or any number of other things go wrong (think accelerators, browser

Re: [PHP] vend-bot?

2011-07-06 Thread Steve Staples
What do you think you gain by limiting the link to a single use? If you think you're preventing them from passing it on to other people, then yes you are, but if you do that then they'll simply send the digital file instead so you're actually trading a poor user experience and increased

[PHP] Re: Self-whitelisting (WAS: Top Posting)

2011-07-06 Thread Jim Giner
George Langley george.lang...@shaw.ca wrote in message news:841bbd90-9cd4-4df5-9a38-ff61638f7...@shaw.ca... On 2011-07-05, at 8:52 PM, Jim Giner wrote: Huh? You have a problem with a person having a spam filter that requires one valid response to ensure that the mail from an address is from

Re: [PHP] Constants in strings

2011-07-06 Thread Dave Wilson
On Wed, 06 Jul 2011 12:56:21 +0100, Stuart Dallas wrote: My guess is that the preceding $ causes PHP to interpret the next token {XYZ} as a variable or a constant, but without that preceding $ it has no way to know you're trying to use a constant. As Curtis points out, the only way to insert a

Re: [PHP] Re: Self-whitelisting (WAS: Top Posting)

2011-07-06 Thread George Langley
On 2011-07-06, at 8:02 AM, Jim Giner wrote: George Langley george.lang...@shaw.ca wrote : On 2011-07-05, at 8:52 PM, Jim Giner wrote: Huh? You have a problem with a person having a spam filter that requires one valid response to ensure that the mail from an address is from a real person

RE: [PHP] Constants in strings

2011-07-06 Thread admin
-Original Message- From: Dave Wilson [mailto:dai_bac...@hotmail.com] Sent: Wednesday, July 06, 2011 10:11 AM To: php-general@lists.php.net Subject: Re: [PHP] Constants in strings On Wed, 06 Jul 2011 12:56:21 +0100, Stuart Dallas wrote: My guess is that the preceding $ causes PHP

RE: [PHP] Constants in strings

2011-07-06 Thread Ashley Sheridan
define('DIR_JAVA', '/js/'); When you need to use the JavaScript directory you can do this. script src=?php echo DIR_JAVA . 'jquery-1.5.1.js';?/script There is no true need for the curly brackets to echo out the value of the constant. Except for when you're using heredoc, much like in the

RE: [PHP] Constants in strings

2011-07-06 Thread Curtis Maurand
Yeah, that was my answer and I was rebuked for that. ad...@buskirkgraphics.com wrote: -Original Message- From: Dave Wilson [mailto:dai_bac...@hotmail.com] Sent: Wednesday, July 06, 2011 10:11 AM To: php-general@lists.php.net Subject: Re: [PHP] Constants in strings On Wed, 06 Jul

RE: [PHP] Constants in strings

2011-07-06 Thread admin
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Wednesday, July 06, 2011 10:49 AM To: ad...@buskirkgraphics.com; 'Dave Wilson'; php-general@lists.php.net Subject: RE: [PHP] Constants in strings define('DIR_JAVA', '/js/'); When you need to

Re: [PHP] Constants in strings

2011-07-06 Thread Robert Williams
On 2011-07-6 08:09, ad...@buskirkgraphics.com ad...@buskirkgraphics.com wrote: I use constants in my OOP and I never use the heredoc syntax. Now I am fearing that I have not taken advantage of something. My understanding of heredoc syntax as of 5.3 is just a string quoting right? Is there an

Re: [PHP] vend-bot?

2011-07-06 Thread Kirk Bailey
On 7/6/2011 9:31 AM, Stuart Dallas wrote: On Wed, Jul 6, 2011 at 3:01 AM, Kirk Bailey kbai...@howlermonkey.net mailto:kbai...@howlermonkey.net wrote: On 7/3/2011 4:53 PM, Stuart Dallas wrote: Only allowing them to access the URL once is a bad idea. If their download

Re: [PHP] vend-bot?

2011-07-06 Thread Kirk Bailey
because some emails do not permit large attachments. On 7/6/2011 9:47 AM, Steve Staples wrote: What do you think you gain by limiting the link to a single use? If you think you're preventing them from passing it on to other people, then yes you are, but if you do that then they'll simply send

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Jim Lucas
On 7/5/2011 7:52 PM, Jim Giner wrote: And what do you use to cut down on spam in your in-box? This is completely off topic, but here it goes... When I received an email the other day from your mail server, I had created this crazy ass reply to your automatic request for a reply. But in turn,

Re: [PHP] Constants in strings

2011-07-06 Thread Jim Giner
I LOVE the heredocs tool. I only learned about it a couple of months ago - what a find! It makes generating my html for my web pages so much easier and allows me to include my php vars within the html with much less confusion and simplifies the intermixing of html and php vars - no more

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Jim Giner
You are currently listed in my /etc/postfix/helo_checks file as 64.118.87.45 REJECT Your mail server is a source of SPAM. Fix it! My mail server is my isp's. It is a shared server and not under my control. They are aware that is listed but cannot get to the bottom of why it is flagged.

Re: [PHP] Constants in strings

2011-07-06 Thread Robert Cummings
On 11-07-06 02:59 PM, Jim Giner wrote: I LOVE the heredocs tool. I only learned about it a couple of months ago - what a find! It makes generating my html for my web pages so much easier and allows me to include my php vars within the html with much less confusion and simplifies the

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Stuart Dallas
On 6 Jul 2011, at 20:03, Jim Giner jim.gi...@albanyhandball.com wrote: Frankly, I don't know why you are getting mail from me - I'm not sending you any. FFS and for the last time... THIS IS A MAILING LIST which you access through a newsgroup gateway. It is NOT a newsgroup! -Stuart --

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Jim Giner
Stuart Dallas stu...@3ft9.com wrote in message news:e73bd95e-0524-4743-92be-ae211b57e...@3ft9.com... On 6 Jul 2011, at 20:03, Jim Giner jim.gi...@albanyhandball.com wrote: Frankly, I don't know why you are getting mail from me - I'm not sending you any. FFS and for the last time... THIS IS

Re: Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Tim Streater
On 06 Jul 2011 at 20:03, Jim Giner jim.gi...@albanyhandball.com wrote: You are currently listed in my /etc/postfix/helo_checks file as 64.118.87.45 REJECT Your mail server is a source of SPAM. Fix it! My mail server is my isp's. It is a shared server and not under my control. They are

Re: Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Tim Streater
On 06 Jul 2011 at 20:03, Jim Giner jim.gi...@albanyhandball.com wrote: Frankly, I don't know why you are getting mail from me - I'm not sending you any. You're sending mail to all of us. Here's what I got from you: To: php-general@lists.php.net From:Jim Giner

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Daniel Brown
On Wed, Jul 6, 2011 at 15:25, Jim Giner jim.gi...@albanyhandball.com wrote: Forgive me for not being a know-it-all.  I don't even know what FFS means. Took me a minute to figure it out as well, and I was just getting ready to Google it when I thought to myself, what is it that Stut would

Re: Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Jim Giner
Tim Streater t...@clothears.org.uk wrote in message news:e5.d2.37602.f96b4...@pb1.pair.com... On 06 Jul 2011 at 20:03, Jim Giner jim.gi...@albanyhandball.com wrote: As for your solution to spam. What is Postfix? Rather than rely on heuristics, I wrote a Bayesian filter for my e-mail app. Let

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Stuart Dallas
On Wed, Jul 6, 2011 at 8:25 PM, Jim Giner jim.gi...@albanyhandball.comwrote: Stuart Dallas stu...@3ft9.com wrote in message news:e73bd95e-0524-4743-92be-ae211b57e...@3ft9.com... On 6 Jul 2011, at 20:03, Jim Giner jim.gi...@albanyhandball.com wrote: Frankly, I don't know why you are getting

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Paul M Foster
On Wed, Jul 06, 2011 at 03:03:44PM -0400, Jim Giner wrote: [snip] As for your solution to spam. What is Postfix? Postfix is a *nix program which can be connected to whatever program you use to grab mail with. With postfix, you write recipes which dictate what will be done with a piece of

Re: [PHP] vend-bot?

2011-07-06 Thread Stuart Dallas
On Wed, Jul 6, 2011 at 6:16 PM, Kirk Bailey kbai...@howlermonkey.netwrote: ** On 7/6/2011 9:31 AM, Stuart Dallas wrote: On Wed, Jul 6, 2011 at 3:01 AM, Kirk Bailey kbai...@howlermonkey.netwrote: On 7/3/2011 4:53 PM, Stuart Dallas wrote: Only allowing them to access the URL once is a bad

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Tamara Temple
On Jul 6, 2011, at 3:19 PM, Paul M Foster wrote: Postfix is a *nix program which can be connected to whatever program you use to grab mail with. With postfix, you write recipes which dictate what will be done with a piece of incoming mail, based on whatever characteristics you choose. Think

Re: [PHP] Spam filtering (was Top Posting)

2011-07-06 Thread Simon J Welsh
On 7/07/2011, at 5:50 AM, Jim Lucas wrote: On 7/5/2011 7:52 PM, Jim Giner wrote: And what do you use to cut down on spam in your in-box? This is completely off topic, but here it goes... When I received an email the other day from your mail server, I had created this crazy ass reply

Re: [PHP] static variables inside static methods

2011-07-06 Thread Дмитрий Степанов
The second case is referencing the varible of the class. Maybe you are right. However, I don't really think that there is a true reference to the class var in example #2. PHP documentation of static keywords does not unambiguously explain behavior of static variables inside methods in example

Re: [PHP] Re: Re: Top Posting

2011-07-06 Thread Paul M Foster
On Wed, Jul 06, 2011 at 04:24:29PM -0500, Tamara Temple wrote: On Jul 6, 2011, at 3:19 PM, Paul M Foster wrote: Postfix is a *nix program which can be connected to whatever program you use to grab mail with. With postfix, you write recipes which dictate what will be done with a piece of

Re: [PHP] static variables inside static methods

2011-07-06 Thread David Harkness
2011/7/6 Дмитрий Степанов dmit...@stepanov.lv PHP documentation of static keywords does not unambiguously explain behavior of static variables inside methods in example #1. I believe that in example #1 the exactly same instance of function (method) is used irregarding of how you call it

Re: [PHP] vend-bot?

2011-07-06 Thread Stuart Dallas
Please include the list when replying. On Wed, Jul 6, 2011 at 10:20 PM, Kirk Bailey kbai...@howlermonkey.netwrote: Um, assuming dishonest intent on the customers part, why would the token NOT be shared? I meant shared within your system between customers. Whether you lock the URL or not, if

Re: [PHP] vend-bot?

2011-07-06 Thread Stuart Dallas
Again, please include the list when replying. On Thu, Jul 7, 2011 at 1:06 AM, Kirk Bailey kbai...@howlermonkey.netwrote: ** On 7/6/2011 6:08 PM, Stuart Dallas wrote: Please include the list when replying. On Wed, Jul 6, 2011 at 10:20 PM, Kirk Bailey kbai...@howlermonkey.netwrote: Um,

[PHP] Re: Re: Top Posting

2011-07-06 Thread Michelle Konzack
Hello Jim Giner, Am 2011-07-05 22:52:39, hacktest Du folgendes herunter: Huh? You have a problem with a person having a spam filter that requires one valid response to ensure that the mail from an address is from a real person ONE TIME ONLY? The problem is, that 1) I read the messages on