[PHP] Re: dynamic copyright in page footer?

2011-04-30 Thread Nathan Rixham
David Mehler wrote: Hello, I am trying to use php to put a copyright notice in a page footer. I'm using the date function with the Y value for the year. Here's the code: ?php echo date ('Y'); ? echo implode(,, range(2011,date(Y))); -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Flattery will get you nowhere

2011-04-28 Thread Nathan Rixham
tedd wrote: At 4:58 PM -0400 4/27/11, Robert Cummings wrote: Tedd who? ;) Cheers, Rob. Rob what? ;-) Cheers, tedd flirting? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] JavaScript Injection ???

2011-04-25 Thread Nathan Rixham
Stuart Dallas wrote: On Monday, 18 April 2011 at 20:50, tedd wrote: The form as-is produced a javascript alert() and now it doesn't. This is not a browser change because it's happening before the browser sees the response (try it with curl). It is the browser, chrome will prevent execution

Re: [PHP] str_replace

2011-04-25 Thread Nathan Rixham
Jim Lucas wrote: On 4/24/2011 8:44 AM, Ron Piggott wrote: I am trying to figure out a syntax that will replace each instance of % with a different letter chosen randomly from the string $puzzle_filler. $puzzle_filler is populated with the letters of the alphabet, roughly in the same ratio as

[PHP] Re: Regex for extracting quoted strings

2011-03-05 Thread Nathan Rixham
Mark Kelly wrote: Hi. I'm hoping someone can help me extract text between double quotes from a string. $regex = 'some magic'; $r = preg_match($regex, $sentence, $phrases); So, if $sentence = 'Dave said This is it. Nope, that is the wrong colour she replied.'; I want $phrases to contain

[PHP] Re: Delaying $(document).ready() in jQuery until php script finish

2011-03-04 Thread Nathan Rixham
Richard Sharp wrote: I have been banging my head trying to figure out how to delay $(document).ready() command until my php script finish running and load data into a csv file. Any ideas *which* PHP script? are you returning an HTML document then keeping the script going in the background,

[PHP] Re: Somewhat OT - Stored Procedures

2011-03-04 Thread Nathan Rixham
Hi Nathan, Nathan Nobbe wrote: Also, bear in mind that personally I tend to favor OO paradigms for application development so would prefer feedback that incorporates that tendency. Initial thoughts are Bad: . Not well suited for ORM, particularly procedures which return multiple result sets

Re: [PHP] Somewhat OT - Stored Procedures

2011-03-04 Thread Nathan Rixham
Richard Quadling wrote: At a fundamental level, my PHP code isn't concerning itself with any physical data structures. As much as possible my PHP code treats the sql data source as a processor ready to supply data in a standardized form (even hierarchical) and to accept data for storage (again

Re: [PHP] something about dates in mysql

2011-03-03 Thread Nathan Rixham
Richard Quadling wrote: On 3 March 2011 10:09, Webforlaget.dk i...@web-forlaget.dk wrote: I need help to know Why this dont work ? - $thisdate =date(Y-m-d,mktime(0,0,0,$mth, $day, $year)); $sql = SELECT id,case,startdate,enddate

[PHP] Re: using BOTH GET and POST in the same page.

2011-02-12 Thread Nathan Rixham
Ashim Kapoor wrote: Dear All, I am reading PHP5 and MySQL Bible. Chapter 7 of the book says that PHP can use GET and POST in the SAME page! Also it says that we can use the SAME variables in GET and POST variable sets and that conflict resolution is done by variable_order option in php.ini Can

[PHP] Re: using BOTH GET and POST in the same page.

2011-02-12 Thread Nathan Rixham
Ashim Kapoor wrote: Dear All, I am reading PHP5 and MySQL Bible. Chapter 7 of the book says that PHP can use GET and POST in the SAME page! Also it says that we can use the SAME variables in GET and POST variable sets and that conflict resolution is done by variable_order option in php.ini Can

[PHP] Re: Simplifying MySql queries

2011-02-12 Thread Nathan Rixham
Andre Polykanine wrote: and here goes the question: is there a way to make these four in one so strictly one random question is selected from all of the four categories? SELECT * FROM `CandidateQuestions` WHERE `Category` IN(1,2,3,4) ORDER BY RAND() LIMIT 4 note the limit 4, you'll

[PHP] Re: query strings and other delights

2011-01-13 Thread Nathan Rixham
kbai...@howlermonkey.net wrote: Your turn! :-D $_GET and if you do post.. (can you guess?) $_POST usage: http://www.foo.org/item1/delivery.php?item=namecode=DATA ?php $_GET['item']; // == name $_GET['code']; // == DATA Best, Nathan -- PHP General Mailing List

[PHP] Re: Rewriting string

2011-01-13 Thread Nathan Rixham
David McGlone wrote: Hi everyone, I think the subject is right, or somewhere close. Anyway I am trying to perform a little trickery here with links. In the following code you can see where I am trying to replace the link on the current page so it's not a link when on that page. I think I got

Re: [PHP] Re: query strings and other delights

2011-01-13 Thread Nathan Rixham
kbai...@howlermonkey.net wrote: ...Holy cow... nothing to extract the query string, it's automatically part of the environment. So I just do work with the $_GET string, it's in there already... yikes. yup OK, so $_GET is an array keyed to keywords; plug in the key, out comes the value. What

[PHP] Re: query strings and other delights

2011-01-13 Thread Nathan Rixham
kbai...@howlermonkey.net wrote: Your turn! :-D just in case I totally misunderstood, and you simply have the string and want to rip out the component parts of the query string, then: ?php $querystring = parse_url($url, PHP_URL_QUERY); parse_str($querystring, $data); print_r(

Re: [PHP] Re: Rewriting string

2011-01-13 Thread Nathan Rixham
Admin wrote: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); If(in_array($_GET['page'], $categories)) { echo 'lia href=index.php?page='.$_GET['page'].''.str_replace(_, ,$_GET['page']).'/a/li'; }else{ echo 'li'.str_replace(_, ,$_GET['page']).'/li'; }

Re: [PHP] Re: Rewriting string

2011-01-13 Thread Nathan Rixham
Nathan Rixham wrote: Admin wrote: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); If(in_array($_GET['page'], $categories)) { echo 'lia href=index.php?page='.$_GET['page'].''.str_replace(_, ,$_GET['page']).'/a/li'; }else{ echo 'li'.str_replace

[PHP] Re: Craigslist Jobs

2011-01-11 Thread Nathan Rixham
Ethan Rosenberg wrote: Dear List - I am a NEWBIE, so . How do I handle Craigslist postings? Is there anything special I should do? Any advice for other web sites? At this point I am talking about small jobs. 1] My payment. Should I ask for something up front? If so how much?

[PHP] PHP Docs update

2011-01-06 Thread Nathan Rixham
To whoever did it, it being http://docs.php.net/ - congrats, v nice, and v quick! Best, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-31 Thread Nathan Rixham
Tamara Temple wrote: On Dec 28, 2010, at 2:11 PM, Joshua Kehn wrote: Specifically: Dotan Cohen wrote: I seem to have an issue with users who copy-paste their usernames and passwords coping and pasting leading and trailing space characters. Users should not be copy-pasting passwords or

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-31 Thread Nathan Rixham
Tamara Temple wrote: Sorry, I was mislead by your use of the phrase Users should not be copy-pasting passwords or usernames above. I'd love to hear what you think is an alternative to identifying with web app that keeps track of information about someone that is more secure. client side ssl

Re: [PHP] Regex for telephone numbers

2010-12-31 Thread Nathan Rixham
Ethan Rosenberg wrote: FYI [to all the list] -- I thank all for their input. I only needed US phones, and I am forcing the user of the form to conform to xxx-xxx- as the input format. out of interest, why are you forcing you're users to conform to that input format? you could simply

Re: [PHP] Regex for telephone numbers

2010-12-31 Thread Nathan Rixham
Ethan Rosenberg wrote: At 07:11 AM 12/31/2010, Nathan Rixham wrote: Ethan Rosenberg wrote: FYI [to all the list] -- I thank all for their input. I only needed US phones, and I am forcing the user of the form to conform to xxx-xxx- as the input format. out of interest, why are you

[PHP] Re: Hot Topics

2010-12-30 Thread Nathan Rixham
Pretty sad day when you have to apologise for being a human on an open list to which you've contributed heavily for many many years. apology not accepted from me Dan, you've nothing to apologise for, and anybody who doesn't like to read a bit of banter between people on a list can just avert

[PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Nathan Rixham
Dotan Cohen wrote: I seem to have an issue with users who copy-paste their usernames and passwords coping and pasting leading and trailing space characters. Don't trim or limit the range of input characters, but far more importantly /don't send passwords in clear text/, indeed don't generate

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Nathan Rixham
Joshua Kehn wrote: Trim usernames but not passwords. agree. nice catch, I was thinking about passwords specifically and forgot usernames was in the topic too! On Dec 28, 2010, at 2:57 PM, Nathan Rixham wrote: Dotan Cohen wrote: I seem to have an issue with users who copy-paste

[PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Nathan Rixham
Dotan Cohen wrote: On Tue, Dec 28, 2010 at 21:57, Nathan Rixham nrix...@gmail.com wrote: Don't trim or limit the range of input characters, but far more importantly /don't send passwords in clear text/, indeed don't generate passwords at all, let users enter there desired password

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Nathan Rixham
Joshua Kehn wrote: On Dec 28, 2010, at 3:18 PM, Dotan Cohen wrote: I'm toying with the idea of having the passwords hashed twice: they're already in the database hashed, and javascript hashes them on the client before sending them over, but I'm thinking about sending an additional salt to the

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Nathan Rixham
Dotan Cohen wrote: On Tue, Dec 28, 2010 at 22:30, Joshua Kehn josh.k...@gmail.com wrote: indeed, and on reflection, if you're putting this much effort in to it, and security is a worry, then forget username and passwords, and issue each user with a client side RSA v3 certificate and identify

Re: [PHP] Scalable Vector Graphics with PHP

2010-12-13 Thread Nathan Rixham
disclaimer: a different nathan You may also be interested in protovis, and raphael, both of which are js libraries which make, or export, svg graphics :) Best, Nathan sudarshana sampath wrote: Nathan, Thank you very much for your response, we are going to visualize network management

[PHP] Re: Announcing New PHP Extension: FileConv

2010-12-12 Thread Nathan Rixham
Nice one Dan, and thanks! :) Daniel Brown wrote: Happy Saturday, folks; I've finally gotten around to releasing my latest PHP extension (which was actually written about two years ago). Named FileConv, it adds native functions for converting back and forth between DOS, *NIX, and

Re: [PHP] ORM doctrine

2010-12-12 Thread Nathan Rixham
Hi All, Apologies for wading in to this discussion, however I must point out that caching at every level is very very important. As Peter says, caching is not an optimization to be thought of later, it is not the icing on the cake, rather, caching is one of the most critical design factors,

Re: [PHP] ORM doctrine

2010-12-12 Thread Nathan Rixham
Tommy Pham wrote: -Original Message- From: Peter Lind [mailto:peter.e.l...@gmail.com] Sent: Sunday, December 12, 2010 5:27 AM To: Lester Caine Cc: php-general@lists.php.net Subject: Re: [PHP] ORM doctrine snip The reason for 'caching' needs to be understood before it is applied in

Re: [PHP] ORM doctrine

2010-12-12 Thread Nathan Rixham
Lester Caine wrote: Nathan Rixham wrote: In your application itself, caching can be introduced at every level, you've already got filesystem io caches provided by the operating system, a well tuned db server cache can make a big difference as well, then on to opcode caches in languages like PHP

Re: [PHP] ORM doctrine

2010-12-12 Thread Nathan Rixham
Lester Caine wrote: For fixed pages this is the best way of handling the information. And handling those fixed pages is ... from my point of view ... not a problem since they can be cached at that level, or even stored locally in the browser cache. I've just been hitting re-load every time for

Re: [PHP] ORM doctrine

2010-12-12 Thread Nathan Rixham
Tommy Pham wrote: -Original Message- From: Nathan Rixham [mailto:nrix...@gmail.com] Sent: Sunday, December 12, 2010 8:23 AM To: Tommy Pham Cc: 'Peter Lind'; php-general@lists.php.net; 'Lester Caine' Subject: Re: [PHP] ORM doctrine Tommy Pham wrote: -Original Message- From

[PHP] Re: Parsing a phrase

2010-12-12 Thread Nathan Rixham
Rick Dwyer wrote: Hello all. I have a page where the user can enter a search phrase and upon submitting, the search phrase is queried in MySQL. However, I need to modify is so each word in the phrase is searched for... not just the exact phrase. So, big blue hat will return results like:

Re: [PHP] Updating a GET variable

2010-11-11 Thread Nathan Rixham
Marc Guay wrote: So all you need to do, is take a look at $_SERVER['HTTP_ACCEPT_LANGUAGE'] to get a users language preferences. Hi Nathan, Yep, I'm using this var to set the default but I think it's nice to allow the user to override it. Maybe someone using their computer is more comfortable

Re: [PHP] Updating a GET variable

2010-11-10 Thread Nathan Rixham
Tamara Temple wrote: On Nov 10, 2010, at 8:58 AM, Marc Guay wrote: foreach($_GET as $k = $v) $qs[$k] = URLDecode($v); $qs['lang'] = 'en'; echo 'a href=index.php?'.http_build_query($qa).'Flip/a'; Hi Tamara, Thanks for the tips. Do you see any advantage of this method over using a small

[PHP] Re: Chat

2010-11-10 Thread Nathan Rixham
Dušan Novaković wrote: Hello there, I have to make chat for website that has around 10 000 users (small social network). So before I start, I would like to hear different opinions. Important thing is to have in mind that in one moment you can have over 1 000 users using chat. So, if you have

Re: [PHP] Template engines

2010-11-10 Thread Nathan Rixham
Daniel P. Brown wrote: On Mon, Nov 8, 2010 at 16:41, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? I chose to write two of my own over the

Re: [PHP] Newbie looking for a project

2010-11-10 Thread Nathan Rixham
tedd wrote: At 12:34 PM -0500 11/8/10, Daniel P. Brown wrote: On Mon, Nov 8, 2010 at 06:29, Ashim Kapoor ashimkap...@gmail.com wrote: Writing apps on my own is fun but it's fruit is only for me to benefit from,but yes if nothing else I should do that. Not at all, many others can

[PHP] Re: Implementing optional methods in a concrete class, but calling themfrom an abstract class.

2010-11-02 Thread Nathan Rixham
Richard Quadling wrote: Hi. I have an abstract base class (call it genericServiceHandler). I have concrete classes (FaxService, EmailService). ... What would you all do? If you've got fixed logic then just add all the onStart onPause and similar methods to the abstract class, stub them to

Re: [PHP] Fwd: Mail delivery failed: returning message to sender

2010-11-02 Thread Nathan Rixham
Ben Brentlinger wrote: it could be that you tried a cheap hosting account with a company that have a bulk mailing script meant for sending spam. I can imagine a spammer hijacking your site to send malware from it, one of the more likely possibilities especially if you have a hosting account with

[PHP] Re: objects and $_SESSION access control

2010-10-26 Thread Nathan Rixham
Lorenzo Marussi wrote: hi List, I have written a library of php classes to manage database objects. So my application now access to this library instead of accessing directly to the database. Now, I need to add an access control to my classes, like a check to a $_SESSION variable. A solution

Re: [PHP] tedd's Friday Post ($ per line)

2010-10-09 Thread Nathan Rixham
tedd wrote: At 4:30 PM +0100 10/8/10, Nathan Rixham wrote: tedd wrote: Now, back to the question at hand -- what price would you sell a line of your code for? Interesting case and question Tedd! Quite sure we all realise the answer is not black and white but various shades of grey, and I

Re: [PHP] What other languages do you use?

2010-10-09 Thread Nathan Rixham
tedd wrote: At 6:30 PM +0100 10/8/10, Nathan Rixham wrote: As per the subject, not what other languages have you used, but what other languages do you currently use? I guess it may also be interesting to know if: (1) there's any particular reason for you using a different language (other

[PHP] Re: php5 - website development - what next

2010-10-08 Thread Nathan Rixham
Rakesh Mishra wrote: Hi All, I am PHP 4 PHP 5 developer for last 6 yrs. Last year also got Zend certification. Since now I have work on different CMS, Social Networking, telecome , horse racing domains. But now I am little bored with developing website. What other things I can do with PHP ?

[PHP] Re: zip and mac safari

2010-10-08 Thread Nathan Rixham
M. Reuter wrote: Hi, does anyone know how to use a php script to zip a folder (with a subfolder) so that safari can open it and not decompresses forever? if it works in other browsers, and not in safari, then it's either a big in safari, in which case report it with an offending zip file -

Re: [PHP] tedd's Friday Post ($ per line)

2010-10-08 Thread Nathan Rixham
tedd wrote: Now, back to the question at hand -- what price would you sell a line of your code for? Interesting case and question Tedd! Quite sure we all realise the answer is not black and white but various shades of grey, and I wouldn't fancy doing this for real - however, given the

Re: [PHP] tedd's Friday Post ($ per line)

2010-10-08 Thread Nathan Rixham
Nathan Rixham wrote: tedd wrote: Now, back to the question at hand -- what price would you sell a line of your code for? Just realised I responded to the wrong question - the answer was how I'd approach the original question What do you think he was paid? For myself, I wouldn't place

Re: [PHP] which one is faster

2010-10-08 Thread Nathan Rixham
chris h wrote: Saeed here's a quick (and dirty) test I ran: $tests = 100; $start = microtime(true); for ($i=0; $i$tests; $i++) { $a = md5( rand() ); $b = md5( rand() ); $c = $a.$b; } var_dump( By concat op:\t. (microtime(true) - $start) ); that's not a fair test because you have

Re: [PHP] Casting from parent class to child

2010-10-08 Thread Nathan Rixham
David Harkness wrote: Casting does not change an object. You must copy the relevant value(s) from the object returned into a new DateTimePlus. Since DateTime's constructor takes only a string, and I assume it won't accept your format directly, unless you implement __toString I believe (not

[PHP] What other languages do you use?

2010-10-08 Thread Nathan Rixham
As per the subject, not what other languages have you used, but what other languages do you currently use? I guess it may also be interesting to know if: (1) there's any particular reason for you using a different language (other than work/day-job/client requires it) (2) about to jump in to

Re: [PHP] What other languages do you use?

2010-10-08 Thread Nathan Rixham
Per Jessen wrote: Nathan Rixham wrote: As per the subject, not what other languages have you used, but what other languages do you currently use? French, German, English and Danish. Forhåbentlig ikke alle zur en même temps -- PHP General Mailing List (http://www.php.net

Re: [PHP] What other languages do you use?

2010-10-08 Thread Nathan Rixham
Daniel P. Brown wrote: On Fri, Oct 8, 2010 at 13:30, Nathan Rixham nrix...@gmail.com wrote: As per the subject, not what other languages have you used, but what other languages do you currently use? Spanish, Gaelic, and German, on occasion. Ahhh, but have you mastered Ambiguity yet? ps

[PHP] Re: Friday's Post

2010-10-01 Thread Nathan Rixham
tedd wrote: Hi gang: What do you people think of the .NET framework? Please provide your thoughts as to cost, maintenance, benefit, and whatever else you think important. .NET is loaded up with patents and pretty much Microsoft only, however that said it is rather good. Previous versions

[PHP] Re: libmcrypt usage

2010-09-16 Thread Nathan Rixham
Gary wrote: Can anyone tell me what the equivalent to the following command line usage of openssl is, in php using the mcrypt_* functions, please: , | openssl enc -e -aes-256-cbc -k some key ... ` TIA. I tried , | $iv =

[PHP] Re: Sending Encrypted Email

2010-09-16 Thread Nathan Rixham
Floyd Resler wrote: I need to send encrypted email. Can I use our server's signed certificate we use for Apache? Yes you can use the servers certificate, you can use any x509 certificate you like - however, I'd recommend checking out startssl.org who will give you a free smime certificate.

[PHP] Re: libmcrypt usage

2010-09-16 Thread Nathan Rixham
Gary wrote: Nathan Rixham wrote: Gary wrote: Can anyone tell me what the equivalent to the following command line usage of openssl is, in php using the mcrypt_* functions, please: , | openssl enc -e -aes-256-cbc -k some key ... ` TIA. I tried , | $iv = mcrypt_create_iv

Re: [PHP] Question about news.php.net

2010-09-14 Thread Nathan Rixham
Daniel Brown wrote: On Mon, Sep 13, 2010 at 18:09, MikeB mpbr...@gmail.com wrote: However, getting access seems to be hit-and-miss, since I more often than not get a message that the connection to news.php.net timed out. Is this an indication that the server is just very busy? I don't get this

[PHP] Re: Adjusting Session Times

2010-09-14 Thread Nathan Rixham
Floyd Resler wrote: We just got a client whose requirement is that user sessions expire after 30 minutes of inactivity. Our other clients are happy with not having their sessions expire during the work day (i.e. life is 8 hours). I am using a MySQL database to store the session data. My

Re: [PHP] php cli question

2010-09-14 Thread Nathan Rixham
Per Jessen wrote: J Ravi Menon wrote: 2) What about garbage collection? In a standard apache-mod-php setup, we rely on the end of a request-cycle to free up resources - close file descriptiors, free up memory etc.. I am assuming in the aforesaid standalone daemon case, we would have to do this

Re: [PHP] 1984 (Big Brother)

2010-09-14 Thread Nathan Rixham
Daniel Brown wrote: On Mon, Sep 13, 2010 at 19:47, Micky Hulse mickyhulse.li...@gmail.com wrote: Motion sensing camera connected to a mechanical pointer stick aimed to trigger the server power button. On his way out of the office: Clap on/clap off Clapper connected to computer power cable.

[PHP] Re: [OUTPUT BUFFER] - problems with redirects

2010-08-20 Thread Nathan Rixham
Nisse Engström wrote: On Thu, 19 Aug 2010 17:47:01 -0600, Tristan wrote: A rewrite of the entire site would be needed in order to fix. So, I guess you are saying as best options for workaround are - use the ob_ functions to work around. - stick output buffer on or high so best case scenario

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Nathan Rixham
Colin Guthrie wrote: Hi, OK, this is really just a sounding board for a couple ideas I'm mulling over regarding a pseudo-randomisation system for some websites I'm doing. Any thoughts on the subject greatly appreciated! Back Story: We have a system that lists things. The things are broken

[PHP] Re: How safe is a .htaccess file?

2010-08-19 Thread Nathan Rixham
tedd wrote: Hi gang: The subject line says it all. How secure is a .htaccess file to store passwords and other sensitive stuff? Can a .htaccess file be viewed remotely? Semi-safe, .htaccess is prevented from being served by configuration options (which come as default), however these

[PHP] Re: How safe is a .htaccess file?

2010-08-19 Thread Nathan Rixham
tedd wrote: tedd wrote: Hi gang: The subject line says it all. How secure is a .htaccess file to store passwords and other sensitive stuff? Can a .htaccess file be viewed remotely? Semi-safe, .htaccess is prevented from being served by configuration options (which come as default),

[PHP] Re: openssl_pkey_new question

2010-08-19 Thread Nathan Rixham
tedd wrote: Hi gang: I'm trying to keep my questions simple. Does the function openssl_pkey_new use 40, 56, 128, 256, or what bit encryption? Higher, and configurable, typically 512,1024,2048,4096 example: $privkey = openssl_pkey_new( array('private_key_bits' = 2048 ) ); Best, Nathan

[PHP] Re: cast changes value

2010-08-19 Thread Nathan Rixham
Martín Marqués wrote: I have values with 2 decimals that I multiple by 100 to make them integers, but to be sure I do a cast using (int). The thing is that (int) is changing the value of the integer. Here is a var_dump of the original value, the value * 100, and the value after casting to int.

[PHP] Re: [OUTPUT BUFFER] - problems with redirects

2010-08-19 Thread Nathan Rixham
Tristan wrote: So, I'm have this site where all this code was developed and the logic sits in different plugins throughout a template. So, html is output and then hits one of these plugins. Plugins do some processing and then hit a header(location...) redirect. So, problem is they developed

[PHP] Re: [OUTPUT BUFFER] - problems with redirects

2010-08-19 Thread Nathan Rixham
whenever you want it to at any point in the page. Thanks, T On Thu, Aug 19, 2010 at 4:22 PM, Nathan Rixham nrix...@gmail.com wrote: Tristan wrote: So, I'm have this site where all this code was developed and the logic sits in different plugins throughout a template. So, html is output

[PHP] Re: PHP 5.3 as a requirement for a library?

2010-07-30 Thread Nathan Rixham
David Harkness wrote: I'm working on the Hamcrest matching library and have been considering the switch to using namespaces (\Hamcrest\Type\IsInteger) instead of class-names-as-namespaces (Hamcrest_Type_IsInteger). Coming from the Java world I'm used to being forced to deploy my applications on

[PHP] Re: socket multithreading problem

2010-07-29 Thread Nathan Rixham
Ümit CAN wrote: Hi All; I use PHP socket programming and I wish multithreading operation of the socket . When I have many requests on this socket , before the first one request is anwered , the second request is not aswered till the first one is finished. How can both requests work

Re: [PHP] the state of the PHP community

2010-07-29 Thread Nathan Rixham
Hi Josh, Thanks for taking the time - comments in-line from here :) Josh Kehn wrote: On Jul 29, 2010, at 1:36 AM, Nathan Rixham wrote: Hi All, I find myself wondering about the state of the PHP community (and related community with a PHP focus), so, here's a bunch of questions - feel free

Re: [PHP] the state of the PHP community

2010-07-29 Thread Nathan Rixham
Larry Garfield wrote: On Thursday 29 July 2010 02:07:58 am you wrote: Hi Larry, Thanks for taking the time to reply, a solid insightful one at that - kudos +1 for your opensource drupal efforts! Good of you to mention, and indeed to see, Palinter grasping opensource with two hands, this is

Re: [PHP] the state of the PHP community

2010-07-29 Thread Nathan Rixham
Larry Garfield wrote: On Thursday 29 July 2010 12:36:13 am Nathan Rixham wrote: Hi All, I find myself wondering about the state of the PHP community (and related community with a PHP focus), so, here's a bunch of questions - feel free to answer none to all of them, on list or off, or add more

Re: [PHP] the state of the PHP community

2010-07-29 Thread Nathan Rixham
Adam Richardson wrote: On Thu, Jul 29, 2010 at 1:36 AM, Nathan Rixham nrix...@gmail.com wrote: Hi All, I find myself wondering about the state of the PHP community (and related community with a PHP focus), so, here's a bunch of questions - feel free to answer none to all of them, on list

Re: [PHP] the state of the PHP community

2010-07-29 Thread Nathan Rixham
/magazine/article.aspx?i=70379 -Original Message- From: Nathan Rixham [mailto:nrix...@gmail.com] Sent: Thursday, July 29, 2010 1:36 AM To: PHP-General Subject: [PHP] the state of the PHP community Hi All, I find myself wondering about the state of the PHP community (and related

Re: [PHP] the state of the PHP community

2010-07-29 Thread Nathan Rixham
Bastien Koert wrote: On Thu, Jul 29, 2010 at 1:36 AM, Nathan Rixham nrix...@gmail.com wrote: Hi All, I find myself wondering about the state of the PHP community (and related community with a PHP focus), so, here's a bunch of questions - feel free to answer none to all of them, on list or off

[PHP] the state of the PHP community

2010-07-28 Thread Nathan Rixham
Hi All, I find myself wondering about the state of the PHP community (and related community with a PHP focus), so, here's a bunch of questions - feel free to answer none to all of them, on list or off, or add more of your own - this isn't for anything specific, just out of interest and sure

[PHP] Re: Does class length slow down performance

2010-07-24 Thread Nathan Rixham
Sebastian Ewert wrote: Hi, I'm developing an joomla component and my helper an user classes are crowing bigger and bigger. The helper class is for static use only. Does class size decrease performance of my php scripts, even for static usage? Is there a general rule when to split a class to

[PHP] Re: PHP app Server Load

2010-06-10 Thread Nathan Rixham
Dan Joseph wrote: Hi, This is slightly OT... We're wrapping up a new PHP/MySQL driven web site built on the Zend Framework. We're anticipating a couple hundred thousand members with several thousand of them coming to the site at once. I'm trying to figure out how to determine how many

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Nathan Rixham
Karl DeSaulniers wrote: can't be done I'm afraid, no matter how hard you look - there is *always* a way around it. only thing you can do is in certain situations ensure that whatever important 'act' is carried out is limited to a fixed person with some personally identifiable data; for

[PHP] Re: Is there a good way to extract the embed/object content in HTML with/without closing tag?

2010-05-23 Thread Nathan Rixham
Chian Hsieh wrote: Hi, I want to extract all contents started with embed and object with/without closing tags. My solution is using a regular expression to get it work, but there is some exception I could not handle out. The REGEXs I used are: // With closing tag if

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Nathan Rixham
quick confirm: flash won't help you here (nor java, ajax, virtualisation, client side programs, ip filtering, browser detection) - it's not possible I'm afraid; best you can do is limit with personally identifiable information and trust that users won't be sharing an account which has

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Robert Cummings wrote: tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it: $text_array = array(); $text_array = explode(\n\n, $input_text); $output_text = implode(\n,$text_array); Sorry tedd, this is

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Nathan Rixham wrote: Robert Cummings wrote: tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it: $text_array = array(); $text_array = explode(\n\n, $input_text); $output_text = implode(\n

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Nathan Rixham wrote: Robert Cummings wrote: tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it: $text_array = array(); $text_array = explode(\n\n

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Nathan Rixham
Karl DeSaulniers wrote: Hi Nathan, The problem is not mine to speak of necessarily. I was trying to help find a solution for another. But from what I understand, they have a online lesson that they dont want people to be able to log in as another user and get the answers to. Here is the

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: Nathan Rixham wrote: Nathan Rixham wrote: Robert Cummings wrote: tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: You may want to start testing your solutions. None have worked yet. Not even close :) filed under 'works for me' ?php $input = 'blah b asd as d asd a sd da asd d asd da'; echo preg_replace( /(\s)\s+/im

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Yes it was client stripping out extra whitespace! thanks Rob, replicated your results: 1 2 3 4 5 6 and then 'fixed' to give what's needed: preg_replace( /(((\r|)\n)(\h*|))+/im, '\\1' , $input ); the above keeps line termination the same

[PHP] Re: How to prevent duplicate record insertion after refreshing php page

2010-05-19 Thread Nathan Rixham
Deva wrote: Hi, If I do refresh after submission of a form, records are getting stored multiple times. I have two pages. /submission-form/ and /thank-you/ I was trying header('Location: /thank-you/'); on submission-form page after successful validation and insertion into db. Still if I do

Re: [PHP] Re: PHP Application Structre

2010-05-11 Thread Nathan Rixham
Nathan Nobbe wrote: On Mon, May 10, 2010 at 9:19 PM, David McGlone da...@dmcentral.net wrote: On Monday 10 May 2010 22:15:44 Paul M Foster wrote: On Mon, May 10, 2010 at 06:09:00PM -0400, David McGlone wrote: On Monday 10 May 2010 13:04:36 richard gray wrote: On 10/05/2010 18:17, Ashley

[PHP] Re: Connection error expected but ...

2010-05-06 Thread Nathan Rixham
Al Mangkok wrote: Code below from the manual. I changed $ldaphost to some fictitious name. When I ran the script, I always get the message Connection was successful ! Why didn't the script bomb and give the could not connect message? ?php // LDAP variables $ldaphost = ldap.noname.com; // your

[PHP] Re: Really impressive work

2010-05-05 Thread Nathan Rixham
tedd wrote: Hi gang: I found something that really impressed me -- please review this: http://palomarjewelry.com/product/id/19/collectionId/1/typeId/3 Try changing the number and type of stones and watch the main image change (i.e., the basket). If one calculates the number of permutations

Re: [PHP] how to check for bandwidth limitations when uploading files?

2010-05-05 Thread Nathan Rixham
Jim Lucas wrote: Robert P. J. Day wrote: probably not really a PHP question but i'll take a chance, anyway. i want to examine the network throughput i can get when continually uploading files from a PHP script via a POST request using the HTTP_Request2 class. i have a client-side script

Re: [PHP] In need of CVS/SVN checkout script for Production servers [solved]

2010-05-05 Thread Nathan Rixham
Daevid Vincent wrote: -Original Message- From: tedd [mailto:tedd.sperl...@gmail.com] Sent: Wednesday, May 05, 2010 8:19 AM To: Daevid Vincent; php-general@lists.php.net Subject: RE: [PHP] In need of CVS/SVN checkout script for Production servers [solved] At 1:10 PM -0700 5/4/10,

  1   2   3   4   5   6   7   8   9   10   >