[PHP] ! function_exists("curl_init") BUT curl_init exists and works.

2008-08-27 Thread daniel danon
! function_exists("curl_init") BUT curl_init exists and works. After my host blocked the file_get_contents and other functions, I am using CURL - but when I do function_exists("curl_init") it returns false but I can still use it anyone knows why? -- PHP General Mailing List (http://www.php.n

Re: [PHP] Re: Sending a POST variable to an ASP page

2008-08-27 Thread Nathan Nobbe
say jesse, if youre subscribed to php-general, you likely did that yourself ;) > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECT

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread Ross McKay
More specifically: option 1 - colour: # red # green # blue colour: $colour\n"; ?> -- Ross McKay, Toronto, NSW Australia "If ye cannae see the bottom, dinnae complain if ye droon" - The Wee Book of Calvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread Ross McKay
On Wed, 27 Aug 2008 22:25:44 -0500, Micah Gersten wrote: >You cannot have anything in the brackets for the name in a checkbox >group. [...] Bollocks. option 1 - colour: option 2 - flavour: option 3 - size: colour: $colour\n"; $flavour = $_POST['options']['flavour']; echo

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread Chris
Micah Gersten wrote: You cannot have anything in the brackets for the name in a checkbox group. The brackets specify that it is an array. The name of the array is the key in $_POST that contains the values of the checkbox group that were checked. You can have as many groups as you like. Eh?

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread Micah Gersten
You cannot have anything in the brackets for the name in a checkbox group. The brackets specify that it is an array. The name of the array is the key in $_POST that contains the values of the checkbox group that were checked. You can have as many groups as you like. Thank you, Micah Gersten onS

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread Shawn McKenzie
tedd wrote: At 1:58 PM -0500 8/27/08, Shawn McKenzie wrote: ioannes wrote: Actually, you are right, as you just put the checkbox index in the POST and get the value from there. So you just need the number of checkboxes...sorry. for ($i = 1; $i <= 4; $i++) { $a = 'a' . $i; $b = 'wha

Re: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Jason Pruim
On Aug 27, 2008, at 6:53 PM, tedd wrote: At 1:03 PM -0500 8/27/08, Jay Blanchard wrote: [snip] My memory may be a bit off but I think tedd is around 4017 (he uses rocks if you can recall) [/snip] I am certainly no less virile. Let's see if anyone can GREP this reference for my age; I was born

Re: [PHP] Regex for email validation

2008-08-27 Thread mike
Honestly, I'd stick to using php's filter extension. It -should- be the best one out there. If it is not processing something it should, then it's a bug - submit it so all of us benefit :) I am tired of trying to find regexps and all that every time, I put my stock into PHP's core when I can. On

Re: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Stut
On 27 Aug 2008, at 22:26, tedd wrote: At 7:35 PM +0100 8/27/08, Stut wrote: On 27 Aug 2008, at 18:44, Jay Blanchard wrote: [snip] Bah, who put me in a box with crayons. I'm a scalpel for crying out loud. Anyways, I could wax on forever, but cutting to the point... I think I'm hanging with the w

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread tedd
At 12:07 AM +0200 8/28/08, Maciek Sokolewicz wrote: tedd wrote: At 1:58 PM -0500 8/27/08, Shawn McKenzie wrote: ioannes wrote: Actually, you are right, as you just put the checkbox index in the POST and get the value from there. So you just need the number of checkboxes...sorry. for ($i =

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread tedd
At 1:03 PM -0500 8/27/08, Jay Blanchard wrote: [snip] My memory may be a bit off but I think tedd is around 4017 (he uses rocks if you can recall) [/snip] I am certainly no less virile. Let's see if anyone can GREP this reference for my age; I was born "The Day the Music Died" That's easy -- B

Re: [PHP] Regex for email validation

2008-08-27 Thread Kevin Waterson
This one time, at band camp, Yeti <[EMAIL PROTECTED]> wrote: > # this one worked fine for me, but it does not cover the full RFC > like: "name" [EMAIL PROTECTED] OR name <[EMAIL PROTECTED]> > $regex = > "^[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)[EMAIL > PROTE

Re: [PHP] Regex for email validation

2008-08-27 Thread tedd
At 8:35 PM +0200 8/27/08, Per Jessen wrote: > So, regardless of the documentation, which may be outdated, I know > that Unicode characters can be used in IDNS and thus on both sides of the @, You're wrong - IDNs only apply to the right side of the @. (check out what the 'D' means). The D

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread Micah Gersten
First, the type is checkbox, not check. Second, you cannot put a value in the brackets for a checkbox group. A checkbox group is passed to PHP automatically as an array. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Maciek Sokolewicz wrote: > Well, this

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread Maciek Sokolewicz
tedd wrote: At 1:58 PM -0500 8/27/08, Shawn McKenzie wrote: ioannes wrote: Actually, you are right, as you just put the checkbox index in the POST and get the value from there. So you just need the number of checkboxes...sorry. for ($i = 1; $i <= 4; $i++) { $a = 'a' . $i; $b = 'wha

Re: [PHP] Regex for email validation

2008-08-27 Thread tedd
At 8:35 PM +0200 8/27/08, Per Jessen wrote: Go on, send me that email to '[EMAIL PROTECTED]' ... for what it's worth, I can't even define an account like that, so my mailserver might well reject it. Yes, you are right. I was thinking of something else, namely that the LHS of the email address

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread tedd
At 1:58 PM -0500 8/27/08, Shawn McKenzie wrote: ioannes wrote: Actually, you are right, as you just put the checkbox index in the POST and get the value from there. So you just need the number of checkboxes...sorry. for ($i = 1; $i <= 4; $i++) { $a = 'a' . $i; $b = 'whatever' . $i;

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread tedd
At 2:54 PM -0400 8/27/08, Robert Cummings wrote: Pamela Anderson still confuses me... as do a lot of so called stars. They all look so plasticky. I tend to err on the side of caution and just assume they're not real. Cheers, Rob. Well, I'm not confused I know what all of those plasticky parts

Re: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread tedd
At 7:35 PM +0100 8/27/08, Stut wrote: On 27 Aug 2008, at 18:44, Jay Blanchard wrote: [snip] Bah, who put me in a box with crayons. I'm a scalpel for crying out loud. Anyways, I could wax on forever, but cutting to the point... I think I'm hanging with the wrong bunch of tools. (multiple puns in

Re: [PHP] Regex for email validation

2008-08-27 Thread Lupus Michaelis
Per Jessen a écrit : I don't know, but I suspect due to lack of support in popular mailers and mail-servers. Also, the use of quotes does make it cumbersome to work with, both as a user and as a mailserver admin. I had to write some pieace of code that can handle "toto toto"@ndd five year

Re: [PHP] Re: Sending a POST variable to an ASP page

2008-08-27 Thread Nathan Nobbe
On Wed, Aug 27, 2008 at 2:41 PM, shaun thornburgh < [EMAIL PROTECTED]> wrote: > > To: php-general@lists.php.net> Date: Wed, 27 Aug 2008 14:07:31 -0500> > From: [EMAIL PROTECTED]> Subject: [PHP] Re: Sending a POST variable to > an ASP page> > shaun thornburgh wrote:> > Hi,> > > > I need to send a p

RE: [PHP] Re: Sending a POST variable to an ASP page

2008-08-27 Thread shaun thornburgh
> To: php-general@lists.php.net> Date: Wed, 27 Aug 2008 14:07:31 -0500> From: > [EMAIL PROTECTED]> Subject: [PHP] Re: Sending a POST variable to an ASP page> > > shaun thornburgh wrote:> > Hi,> > > > I need to send a post variable to an > ASP page, can I do this within my PHP script?> > > >

Re: [PHP]About the magic function __call

2008-08-27 Thread Paulo Sousa
My information was incomplete: I'm running php 5.1.2 (a requirement from the customer). I found this http://bugs.php.net/bug.php?id=42937 I "coded" this without testing, using only the idea. Thanks! Thanks for the help Nathan! 2008/8/27 Nathan Nobbe <[EMAIL PROTECTED]> > On Wed, Aug 27, 2008 a

Re: [PHP]About the magic function __call

2008-08-27 Thread Nathan Nobbe
On Wed, Aug 27, 2008 at 1:49 PM, Nathan Nobbe <[EMAIL PROTECTED]>wrote: > On Wed, Aug 27, 2008 at 1:35 PM, Paulo Sousa <[EMAIL PROTECTED]>wrote: > ... > this *should* work, here is a test, tests/classes/__call_005.phpt, you can take the part beneath the --FILE-- section and see if it blows up o

Re: [PHP]About the magic function __call

2008-08-27 Thread Nathan Nobbe
On Wed, Aug 27, 2008 at 1:35 PM, Paulo Sousa <[EMAIL PROTECTED]>wrote: > Hi there! > > I'm working with the following code: > > > abstract class Foo{ > > protected $a; > protected $b; > protected $c; > > function __construct($arg){ > $this->a = $arg; > } > > function __call($function, $args){

[PHP]About the magic function __call

2008-08-27 Thread Paulo Sousa
Hi there! I'm working with the following code: a = $arg; } function __call($function, $args){ $this->b = $function; $this->c = $args; $this->doWhatever(); } private doWhatever(){ } } class Boo extends Foo{ protected $e; public function __construct(){ parent::__construct('Blah'); }

Re: [PHP] Regex for email validation

2008-08-27 Thread Per Jessen
Lupus Michaelis wrote: > Per Jessen a écrit : > >> That format is about as dead as the dinosaurs. > >Why ? I don't know, but I suspect due to lack of support in popular mailers and mail-servers. Also, the use of quotes does make it cumbersome to work with, both as a user and as a mailserve

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Robert Cummings
On Wed, 2008-08-27 at 14:57 -0400, tedd wrote: > At 1:55 PM -0400 8/27/08, Robert Cummings wrote: > >My memory may be a bit off but I think tedd is around 4017 (he uses > >rocks if you can recall) but I have no idea about your age... myself I'm > >a virile 34 year old :D > > > >Cheers, > >Rob. > >

Re: [PHP] Sending a POST variable to an ASP page

2008-08-27 Thread Nathan Nobbe
heres a simple example shaun, $cH = curl_init('url to asp box'); curl_setopt_array( $cH, array( CURLOPT_POST => TRUE, * CURLOPT_POSTFIELDS* => array( 'yourParamName' => 'yourParamVal' ) )); $response = curl_exec($cH); personally though, i prefer the http extension

[PHP] Re: Sending a POST variable to an ASP page

2008-08-27 Thread Shawn McKenzie
shaun thornburgh wrote: Hi, I need to send a post variable to an ASP page, can I do this within my PHP script? I don't need to view the page, or get any acknowledgment back, just send the single POST variable... Thanks for your advice ___

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread Shawn McKenzie
ioannes wrote: Actually, you are right, as you just put the checkbox index in the POST and get the value from there. So you just need the number of checkboxes...sorry. ioannes wrote: Yes, Tedd, this does however incur the overhead of find out what i is, because it could be a range of IDs fro

Re: [PHP] Sending a POST variable to an ASP page

2008-08-27 Thread Nathan Nobbe
On Wed, Aug 27, 2008 at 12:13 PM, tedd <[EMAIL PROTECTED]> wrote: > At 5:54 PM + 8/27/08, shaun thornburgh wrote: > >> Hi, >> >> I need to send a post variable to an ASP page, can I do this within my PHP >> script? >> >> I don't need to view the page, or get any acknowledgment back, just send

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread tedd
At 1:55 PM -0400 8/27/08, Robert Cummings wrote: My memory may be a bit off but I think tedd is around 4017 (he uses rocks if you can recall) but I have no idea about your age... myself I'm a virile 34 year old :D Cheers, Rob. I've been around long enough to remember that pyramids were the fir

RE: [PHP] Sending a POST variable to an ASP page

2008-08-27 Thread shaun thornburgh
> Date: Wed, 27 Aug 2008 14:13:23 -0400> To: php-general@lists.php.net> From: > [EMAIL PROTECTED]> Subject: Re: [PHP] Sending a POST variable to an ASP page> > > At 5:54 PM + 8/27/08, shaun thornburgh wrote:> >Hi,> >> >I need to send > a post variable to an ASP page, can I do this within

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Robert Cummings
On Wed, 2008-08-27 at 14:49 -0400, tedd wrote: > At 12:44 PM -0500 8/27/08, Jay Blanchard wrote: > >tedd-o has been around for a long time and has witnessed the evolution > >of said blow-ups dolls enough to know when he sees quality, form and > >function. > > > >I think I may be the second oldest r

Re: [PHP] Regex for email validation

2008-08-27 Thread Lupus Michaelis
Per Jessen a écrit : That format is about as dead as the dinosaurs. Why ? -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Robert Cummings
On Wed, 2008-08-27 at 14:44 -0400, tedd wrote: > At 1:24 PM -0400 8/27/08, Robert Cummings wrote: > >On Wed, 2008-08-27 at 13:17 -0400, tedd wrote: > > > As it is, you Stut, Rob, and Daniel are going to be the ones who > >> fight out who's the sharpest crayon in this box. I'm glad I no longer > >

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread tedd
At 12:44 PM -0500 8/27/08, Jay Blanchard wrote: tedd-o has been around for a long time and has witnessed the evolution of said blow-ups dolls enough to know when he sees quality, form and function. I think I may be the second oldest regular on the listtedd and I had that discussion once befo

Re: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread tedd
At 1:24 PM -0400 8/27/08, Robert Cummings wrote: On Wed, 2008-08-27 at 13:17 -0400, tedd wrote: > As it is, you Stut, Rob, and Daniel are going to be the ones who fight out who's the sharpest crayon in this box. I'm glad I no longer have to defend that title (as if I ever did). Bah, who put

Re: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread tedd
At 1:24 PM -0400 8/27/08, Jason Pruim wrote: On Aug 27, 2008, at 1:17 PM, tedd wrote: At 5:46 PM +0100 8/27/08, Colin Guthrie wrote: tedd wrote: PS: As for me -- thanks, but I'm not the smart one on this list -- just the best looking. :-) Age before beauty. oh wait. Dang. :p Col Yes,

Re: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Stut
On 27 Aug 2008, at 18:44, Jay Blanchard wrote: [snip] Bah, who put me in a box with crayons. I'm a scalpel for crying out loud. Anyways, I could wax on forever, but cutting to the point... I think I'm hanging with the wrong bunch of tools. (multiple puns intended ;) [/snip] I, myself, am a hamm

Re: [PHP] Regex for email validation

2008-08-27 Thread Per Jessen
tedd wrote: > >>No, they can't. There are no 8-bit characters allowed in an >>email-address. Check out RFC2821. > > You can throw all the facts and documentation you want at me, but the > left side of the @ has always been open to anything you want. Except anything 8-bit, yes. Seriously, r

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread ioannes
Actually, you are right, as you just put the checkbox index in the POST and get the value from there. So you just need the number of checkboxes...sorry. ioannes wrote: Yes, Tedd, this does however incur the overhead of find out what i is, because it could be a range of IDs from the database,

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread tedd
At 7:08 PM +0100 8/27/08, ioannes wrote: Yes, Tedd, this does however incur the overhead of find out what i is, because it could be a range of IDs from the database, not necessarily a count of the checkboxes on the page: " for ($i = 1; $i <= 4; $i++) { $a = 'a' . $i; $b = 'whatever' .

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Jay Blanchard
[snip] 1959 [/snip] Very good! That puts me learning / writing Fortran when you were in diapersassuming you wore diapers of course. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sending a POST variable to an ASP page

2008-08-27 Thread tedd
At 5:54 PM + 8/27/08, shaun thornburgh wrote: Hi, I need to send a post variable to an ASP page, can I do this within my PHP script? I don't need to view the page, or get any acknowledgment back, just send the single POST variable... The point is not IF php can send a POST (it can), bu

Re: [PHP] Regex for email validation

2008-08-27 Thread tedd
At 7:55 PM +0200 8/27/08, Lupus Michaelis wrote: mike a écrit : php should have a good check built-in. see http://www.php.net/manual/en/function.filter-var.php Argh ! Howmany times it is in ? I spent so many time to write a regex that belongs the RFC822 :-/ Because all the regex in answe

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread ioannes
Yes, Tedd, this does however incur the overhead of find out what i is, because it could be a range of IDs from the database, not necessarily a count of the checkboxes on the page: " for ($i = 1; $i <= 4; $i++) { $a = 'a' . $i; $b = 'whatever' . $i; if($_POST[$a] == 'on') {

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Robert Cummings
On Wed, 2008-08-27 at 13:03 -0500, Jay Blanchard wrote: > [snip] > My memory may be a bit off but I think tedd is around 4017 (he uses > rocks if you can recall) > [/snip] > > I am certainly no less virile. Let's see if anyone can GREP this > reference for my age; I was born "The Day the Music Die

Re: [PHP] Regex for email validation

2008-08-27 Thread tedd
At 6:30 PM +0200 8/27/08, Per Jessen wrote: Well, I left that for the OP to figure out. Still, your regex is worse - a domain name cannot contain '%'. The only valid characters for a domain name are letters, numbers and a hyphen. Also, maximum length for a domain name is 64 characters, which c

Re: [PHP] Regex for email validation

2008-08-27 Thread Per Jessen
Lupus Michaelis wrote: >Argh ! Howmany times it is in ? I spent so many time to write a >regex > that belongs the RFC822 :-/ Because all the regex in answer here was > false. They don't allow email like "Mickael Doodoo"@lupusmic.com nor That format is about as dead as the dinosaurs. I kn

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Jay Blanchard
[snip] My memory may be a bit off but I think tedd is around 4017 (he uses rocks if you can recall) [/snip] I am certainly no less virile. Let's see if anyone can GREP this reference for my age; I was born "The Day the Music Died" -- PHP General Mailing List (http://www.php.net/) To unsubscribe

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Robert Cummings
On Wed, 2008-08-27 at 12:44 -0500, Jay Blanchard wrote: > [snip] > Bah, who put me in a box with crayons. I'm a scalpel for crying out > loud. Anyways, I could wax on forever, but cutting to the point... I > think I'm hanging with the wrong bunch of tools. > > (multiple puns intended ;) > [/snip]

[PHP] Sending a POST variable to an ASP page

2008-08-27 Thread shaun thornburgh
Hi, I need to send a post variable to an ASP page, can I do this within my PHP script? I don't need to view the page, or get any acknowledgment back, just send the single POST variable... Thanks for your advice _ Get Hotmail on

Re: [PHP] Regex for email validation

2008-08-27 Thread Lupus Michaelis
mike a écrit : php should have a good check built-in. see http://www.php.net/manual/en/function.filter-var.php Argh ! Howmany times it is in ? I spent so many time to write a regex that belongs the RFC822 :-/ Because all the regex in answer here was false. They don't allow email like "Mic

RE: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Jay Blanchard
[snip] Bah, who put me in a box with crayons. I'm a scalpel for crying out loud. Anyways, I could wax on forever, but cutting to the point... I think I'm hanging with the wrong bunch of tools. (multiple puns intended ;) [/snip] I, myself, am a hammer [sniperoo] > But, I would rather get the

[PHP] [OT|Troll] Re: [PHP] Re: PHP IDE needed

2008-08-27 Thread Lupus Michaelis
Sancar Saran a écrit : Whats wrong with echo "" > index.php Two syntacticals errors ? :p is there anything to satisfy your needs... I prefer cat for that purpose, more flexible. -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP General Mailing List (http://www.php.net/

Re: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Robert Cummings
On Wed, 2008-08-27 at 13:17 -0400, tedd wrote: > At 5:46 PM +0100 8/27/08, Colin Guthrie wrote: > >tedd wrote: > >>PS: As for me -- thanks, but I'm not the smart one on this list -- > >>just the best looking. :-) > > > >Age before beauty. oh wait. Dang. :p > > > >Col > > Yes, I have both thos

Re: [PHP] Re: concatenating with "." or ","

2008-08-27 Thread Jason Pruim
On Aug 27, 2008, at 1:17 PM, tedd wrote: At 5:46 PM +0100 8/27/08, Colin Guthrie wrote: tedd wrote: PS: As for me -- thanks, but I'm not the smart one on this list -- just the best looking. :-) Age before beauty. oh wait. Dang. :p Col Yes, I have both those categories tied up. As i

Re: [PHP] concatenating with "." or ","

2008-08-27 Thread Robert Cummings
On Wed, 2008-08-27 at 13:13 -0400, tedd wrote: > At 12:17 PM -0400 8/27/08, Robert Cummings wrote: > >What does random have to do with > > Oh no! > > Someone mentioned the R word in front of Rob. > > We should put this in a list of things not to do on this list. *heheh* well in the above I'm no

Re: [PHP] Re: Benchmark for echoing via comma, concat, inteprolation, and heredoc.

2008-08-27 Thread Robert Cummings
On Wed, 2008-08-27 at 18:02 +0100, Colin Guthrie wrote: > Robert Cummings wrote: > > That echo benchmark though... WTF! > > Yup similar numbers here tho' not quite as staggering on my setup: Hah, your values led me to think about it... then I realized I've been playing around with Xen lately and

[PHP] Re: concatenating with "." or ","

2008-08-27 Thread tedd
At 5:46 PM +0100 8/27/08, Colin Guthrie wrote: tedd wrote: PS: As for me -- thanks, but I'm not the smart one on this list -- just the best looking. :-) Age before beauty. oh wait. Dang. :p Col Yes, I have both those categories tied up. As it is, you Stut, Rob, and Daniel are going to

Re: [PHP] concatenating with "." or ","

2008-08-27 Thread tedd
At 12:17 PM -0400 8/27/08, Robert Cummings wrote: What does random have to do with Oh no! Someone mentioned the R word in front of Rob. We should put this in a list of things not to do on this list. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.

Re: [PHP] Benchmark for echoing via comma, concat, inteprolation, and heredoc.

2008-08-27 Thread tedd
At 12:35 PM -0400 8/27/08, Robert Cummings wrote: -big snip- That echo benchmark though... WTF! Scripts are attached for your own testing / commenting about how much they suck ;) Cheers, Rob. Way to go Rob -- however, we have to realize that this is one of those things that only Geeks get

[PHP] Re: Benchmark for echoing via comma, concat, inteprolation, and heredoc.

2008-08-27 Thread Colin Guthrie
Robert Cummings wrote: That echo benchmark though... WTF! Yup similar numbers here tho' not quite as staggering on my setup: PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 25 2008 10:09:21) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technolog

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread tedd
At 4:55 PM +0100 8/27/08, JOHN DILLON wrote: Perhaps this example may help. Eg: a form with checkboxes and submit button, a few are checked and I want to delete the corresponding records from the database. The database table has an ID column: for each ($argv as $key=>$value) { //$key is

[PHP] Re: concatenating with "." or ","

2008-08-27 Thread Colin Guthrie
tedd wrote: PS: As for me -- thanks, but I'm not the smart one on this list -- just the best looking. :-) Age before beauty. oh wait. Dang. :p Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Ma

[PHP] Benchmark for echoing via comma, concat, inteprolation, and heredoc.

2008-08-27 Thread Robert Cummings
I've attached 4 scripts to benchmark each of the various methods of echoing content. I was very surprised to find that the state of things is completely out of synch with what many of us have come to expect. That said, I trust these benchmarks. Output has been redirected to /dev/null so that render

Re: [PHP] Regex for email validation

2008-08-27 Thread Per Jessen
Yeti wrote: > # this one worked fine for me, but it does not cover the full RFC > like: "name" [EMAIL PROTECTED] OR name <[EMAIL PROTECTED]> > $regex = > "^[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\ \^_`\{\|}~-]+)[EMAIL PROTECTED](\.[a-z0-9-]+)*\.([a-z]{2,})$"; For the domain

Re: [PHP] Regex for email validation

2008-08-27 Thread Per Jessen
tedd wrote: >> >>Option 1: /[EMAIL PROTECTED]/ >> >>This is probably what you meant: >> >>/[EMAIL PROTECTED]/ >> >>/Per Jessen, Zürich > > Which is probably what you meant: > > eregi("[EMAIL PROTECTED],6}$", $email) > > Email comes in different TLD flavors. Well, I left that for the OP to fi

Re: [PHP] concatenating with "." or ","

2008-08-27 Thread Robert Cummings
On Wed, 2008-08-27 at 12:27 +0200, Bernhard Kohl wrote: > tedd wrote: > > There are significant orders of magnitude difference between your results > > and mine. > > For example, it didn't make any difference if you used a comma or > > concatenation, but in my system concatenation was 15 times fast

[PHP] Re: [PHP-DB] Problem with updating MySQL table

2008-08-27 Thread Jason Pruim
On Aug 27, 2008, at 12:06 PM, Jason Pruim wrote: Hi Everyone, So I'm working on a project (Same one I sent the question about regarding the user access rights on monday) And now I am attempting to update the record... Here is some of my code: index.php First Name/Last Namevalue="{$row[

Re: [PHP] Regex for email validation

2008-08-27 Thread Yeti
$regex = "^[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)[EMAIL PROTECTED](\.[a-z0-9-]+)*\.([a-z]{2,})$"; if (eregi($regex, $email)) { // do something } # Beware that the filter functions only work under PHP5+. If your PHP supports them they should be the preferred

Re: [PHP] Re: Variable name as a string

2008-08-27 Thread JOHN DILLON
Perhaps this example may help. Eg: a form with checkboxes and submit button, a few are checked and I want to delete the corresponding records from the database. The database table has an ID column: for each ($argv as $key=>$value) { //$key is named cb_1 $value is "checked" //to get 1 fr

Re: [PHP] Search Suggestions

2008-08-27 Thread tedd
At 9:31 AM -0400 8/26/08, Dan Shirah wrote: Any ideas? Dan: Yes, a few of them. 1. Use LIMIT in your MySQL query to get the number of records provided down to a manageable size. 2. Use pagination to keep the page size to a manageable size. Here's an example: http://php1.net/b/pagination-

Re: [PHP] restricted file access

2008-08-27 Thread Tiago Palhota
Hello, i saw that the end file always has the name test.zip ( http://php1.net/b/file-browser/index.php ) Are you zipping the file before outputing to the user ? In that case, you are accomplishing the desired goal of hidding the path, because the file changed but the path is always the same. Am

Re: [PHP] restricted file access

2008-08-27 Thread tedd
At 4:13 PM +0200 8/27/08, Angelo Zanetti wrote: Hi all, We have a site and we have created an admin section where the admin can upload documents. We have made a user login section where they can view a list of the documents (from the DB) and download the file. We want to make the site however

Re: [PHP] Regex for email validation

2008-08-27 Thread tedd
At 9:31 AM +0200 8/27/08, Per Jessen wrote: VamVan wrote: Hello Guys, Does any have a regex for email validation? I need to allow only period and underscore in the local part , we would need a @ and .com or watever for domain. Option 1: /[EMAIL PROTECTED]/ This is probably what you me

Re: [PHP] comments function being spammed, how do I stop it?

2008-08-27 Thread Stut
On 27 Aug 2008, at 15:37, tedd wrote: At 3:37 PM +0100 8/26/08, Stut wrote: In my experience most spam can be blocked by case-insensitively checking for "[url" and "there that don't include URLs. -Stut Well... that would block me many times from providing comment for I often not only comm

Re: [PHP] concatenating with "." or ","

2008-08-27 Thread tedd
At 7:56 PM -0600 8/26/08, Govinda wrote: I never thanked all the people who answered my Q in so many helpful ways and on so many levels.I see that this list if chock full of really quality people with loads of expertise and many other fine qualities (tedd sperling's broad perspective, for o

Re: [PHP] comments function being spammed, how do I stop it?

2008-08-27 Thread tedd
At 3:37 PM +0100 8/26/08, Stut wrote: In my experience most spam can be blocked by case-insensitively checking for "[url" and "there that don't include URLs. -Stut Well... that would block me many times from providing comment for I often not only comment but back my point up with a link to a

[PHP] Re: Variable name as a string

2008-08-27 Thread Shawn McKenzie
ioannes wrote: Could someone tell me how to get the name of a variable as a string. This would be useful in form submission with multiple check-boxes to match against database records. At the moment I use ${"var".$ID[$x]} or someting like that to go through all the possible matches, but it wo

Re: [PHP] PHP IDE needed

2008-08-27 Thread Shawn McKenzie
VamVan wrote: use Aptana its awesome and free as well. thanks And it's Eclipse as well :-) -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] restricted file access

2008-08-27 Thread Angelo Zanetti
Hi all, We have a site and we have created an admin section where the admin can upload documents. We have made a user login section where they can view a list of the documents (from the DB) and download the file. We want to make the site however not allow ppl to type in the path of the document

Re: [PHP] Variable name as a string

2008-08-27 Thread Hélio Rocha
U could use an array to keep all of your fieldnames as keys and the values would be the values of the form inputs. That would be very easy and with no programagic. On Wed, Aug 27, 2008 at 3:00 PM, ioannes <[EMAIL PROTECTED]> wrote: > Could someone tell me how to get the name of a variable as a st

[PHP] Variable name as a string

2008-08-27 Thread ioannes
Could someone tell me how to get the name of a variable as a string. This would be useful in form submission with multiple check-boxes to match against database records. At the moment I use ${"var".$ID[$x]} or someting like that to go through all the possible matches, but it would be quicker

RE: [PHP] Closing a website (mod_redirect) SOLVED

2008-08-27 Thread tedd
At 5:42 PM +0100 8/26/08, Alex Chamberlain wrote: Why do you always solve a problem you have been working on for a day as soon as you email a mail list!?! The serious answer to that is -- when you have to explain the problem to others, it's often the first time you've fully realized the probl

Re: [PHP] Assign things to users

2008-08-27 Thread tedd
At 10:20 AM -0400 8/26/08, Dan Joseph wrote: My question is: How do you all do handle similar situations like this? I've been thinking there has to be a better way to do it, but I have not been able to think of a good way to do it. I'd like to see how if I'm doing it like everyone else, or what

Re: [PHP] PHP editor for linux

2008-08-27 Thread Shelley
Yes, it's quite nice actually. I used it once. And I am using vim on Linux platform now. I am feeling quite easy with it. Maybe you have noticed the survey I made on http://phparch.cn. A lot of people just look at the result. I really want people to choose their option first. Because that's helpfu

Re: [PHP] comments function being spammed, how do I stop it?

2008-08-27 Thread David Robley
tedd wrote: > At 3:14 PM -0700 8/25/08, Jim Lucas wrote: >>Here is the function that I added to a generic guest book script. >>It works great for me. I have a predefined list of sexual, >>pharmaceutical, rude, vulgar, etc... words that I have in the >>spamwords.dat file. >> >>function is_spam($st

Re: [PHP] concatenating with "." or ","

2008-08-27 Thread Bernhard Kohl
tedd wrote: > There are significant orders of magnitude difference between your results > and mine. > For example, it didn't make any difference if you used a comma or > concatenation, but in my system concatenation was 15 times faster than using > a comma. Interesting, I would have guessed it woul

Re: [PHP] Bug in array_key_exist?

2008-08-27 Thread Korgan
Korgan napsal(a): Jim Lucas napsal(a): Korgan wrote: Hi, I have a problem with array_key_exists in if statement. I have a class with this function class XXX { private items = array(); ... ... ... public function addXXX($id, $count) { $count = (int)$cout; Let me point at

Re: [PHP] Regex for email validation

2008-08-27 Thread Richard Heyes
> Does any have a regex for email validation? I need to allow only period and > underscore in the local part , we would need a @ and .com or watever for > domain. You could: 1. Take the isValidInetAddress() method out of the PEAR Mail_RFC822 class and use that. 2. Use the filter extension which I

Re: [PHP] Re: PHP IDE needed

2008-08-27 Thread Sancar Saran
Whats wrong with echo "" > index.php is there anything to satisfy your needs... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regex for email validation

2008-08-27 Thread Micah Gersten
That's a very handy extension. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com mike wrote: > > php should have a good check built-in. > > see http://www.php.net/manual/en/function.filter-var.php > > if(!filter_var($var, FILTER_VALIDATE_EMAIL)) { > echo "inv

Re: [PHP] Regex for email validation

2008-08-27 Thread Per Jessen
VamVan wrote: > Hello Guys, > > Does any have a regex for email validation? I need to allow only > period and underscore in the local part , we would need a @ and .com > or watever for domain. Option 1: /[EMAIL PROTECTED]/ This is probably what you meant: /[EMAIL PROTECTED]/ /Per Jessen, Z

Re: [PHP] Regex for email validation

2008-08-27 Thread mike
> On 8/27/08, VamVan <[EMAIL PROTECTED]> wrote: > Hello Guys, > > Does any have a regex for email validation? I need to allow only period and > underscore in the local part , we would need a @ and .com or watever for > domain. php should have a good check built-in. see http://www.php.net/manual/e

[PHP] Re: PHP IDE needed

2008-08-27 Thread Carlos Medina
Sascha Braun schrieb: Hi people, I have a webproject which is round about 3 GB in size. I was usually using eclipse to work with the software but over time eclipse became very instable regarding that project. As soon as I open classes with 2000 or more lines of code in it, an out of memory erro

[PHP] Regex for email validation

2008-08-27 Thread VamVan
Hello Guys, Does any have a regex for email validation? I need to allow only period and underscore in the local part , we would need a @ and .com or watever for domain. thank you

  1   2   >