[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: echo implode(",", range(2011,date("Y"))); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

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] 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 the

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 executio

[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 cont

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 hi

[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 co

[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, /o

Re: [PHP] something about dates in mysql

2011-03-03 Thread Nathan Rixham
Richard Quadling wrote: On 3 March 2011 10:09, Webforlaget.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 FROM table WHERE s

[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: 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

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 ''.str_replace("_","

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 ''.str_replace("_"," ",$_GET['page']).''; }else{ echo ''.str_replace("_"," ",$_GET['page']).''; } I normally never write someones code for t

[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: Or similar, watch out for parse_str though as it'll swap out spaces and . for _ - which is nice. -- PHP

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: 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

[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=name&code=DATA http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[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? depend

[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] 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

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 stri

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] 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 use

[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 t

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 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 them via the public ke

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 c

[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 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, then they wo

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 their

[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

[PHP] Re: PDO: good, popular?

2010-12-14 Thread Nathan Rixham
Sam Smith wrote: Searching for "PHP CRUD" in hopes of learning the best way to access databases and to use PEAR or what I came across PDO. I want to know the communities opinion of PDO: everyone uses it or no one uses it or it's great or what? It's probably you're best bet, and is certainly go

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 system

[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] 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: -Origin

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
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 lik

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 The reason for 'caching' needs to be understood before it is applied in order

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,

[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 legacy

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] 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 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 benefit from it as well. T

Re: [PHP] Template engines

2010-11-10 Thread Nathan Rixham
Daniel P. Brown wrote: On Mon, Nov 8, 2010 at 16:41, Hansen, Mike 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 years: one procedural, one

[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 tim

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 'Flip'; Hi Tamara, Thanks for the tips. Do you see any advantage of this method over using a small POST form besides the styling problems I'll run

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: 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 ac

[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 c

Re: [PHP] "My truth comes out" [1]

2010-10-23 Thread Nathan Rixham
Richard Quadling wrote: On 21 October 2010 12:42, Richard Quadling wrote: On 21 October 2010 10:39, Gary wrote: Is there any nice way to convert a string containing either "TRUE" or "FALSE" to a bool with the appropriate value? I know I can just "if (strcmp..." but, as the song goes on to say

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 (

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-08 Thread Nathan Rixham
Daniel P. Brown wrote: On Fri, Oct 8, 2010 at 13:30, Nathan Rixham 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: thanks for that

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/) To

[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] 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 test

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 ha

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 w

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 assumpt

[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 - or

[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: 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 of

[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 ... ` TIA. I tried , | $iv = mcrypt_create_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: 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 ... ` TIA. I tried , | $iv = mcrypt_create_iv(mcrypt_get_block_size(MCRYPT_RIJNDAEL_256, |

Re: [PHP] 1984 (Big Brother)

2010-09-14 Thread Nathan Rixham
Daniel Brown wrote: On Mon, Sep 13, 2010 at 19:47, Micky Hulse 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. It would be cheaper to

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 m

[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 tho

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 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 on any other news

[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 down

[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 u

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

2010-08-19 Thread Nathan Rixham
tput html and just have it redirect whenever you want it to at any point in the page. Thanks, T On Thu, Aug 19, 2010 at 4:22 PM, Nathan Rixham 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.

[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 code

[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: 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: 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), howe

[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 can

[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 v

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 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 mo

Re: [PHP] the state of the PHP community

2010-07-29 Thread Nathan Rixham
zine/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 commun

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 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

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

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 ce

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

[PHP] Re: socket multithreading problem

2010-07-28 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

[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 I

[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 kee

[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 servers

Re: [PHP] constant from variable

2010-06-04 Thread Nathan Rixham
Tanel Tammik wrote: "Nathan Rixham" wrote in message news:4c097083.3080...@gmail.com... Tanel Tammik wrote: ""Tanel Tammik"" wrote in message news:31.a3.00596.0d759...@pb1.pair.com... "Ashley Sheridan" wrote in message news:1275678975.2217.83.ca...@l

[PHP] Re: Script to add domain users to local groups on remote machines

2010-06-04 Thread Nathan Rixham
Mayer, Jonathan wrote: Hello, Has anyone got any ideas how I might add a user to a local group on a remote networked Windows machine via a PHP script? The idea is to make an automated tool where users can request access to a shared folder via our intranet, and after suitable approval the system

Re: [PHP] constant from variable

2010-06-04 Thread Nathan Rixham
Tanel Tammik wrote: ""Tanel Tammik"" wrote in message news:31.a3.00596.0d759...@pb1.pair.com... "Ashley Sheridan" wrote in message news:1275678975.2217.83.ca...@localhost... On Fri, 2010-06-04 at 22:07 +0300, Tanel Tammik wrote: Hi, define('MYCONST', 'something'); $my = 'my'; $const = 'co

Re: [PHP] determining time difference between two timestamp fields.

2010-05-25 Thread Nathan Rixham
Ashley Sheridan wrote: On Tue, 2010-05-25 at 14:22 -0400, Bruce Gilbert wrote: echo "Completion Time:". date('F j, Y g:i:sa',strtotime($row['submit_timestamp']) - strtotime($row['login_timestamp']))/60 , ""; There's a good reason for that! What you're actually doing is this: echo "Completion

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

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' Doesn't appear to work on the following: $input = ' 1 2 3 4 5 6'; Additionall

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 it

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 their

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("

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 = i

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

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 sensitive

[PHP] Re: Is there a good way to extract the / 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 and 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 (preg_match_all("#(<(object|embed)[^>]

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 ins

  1   2   3   4   5   6   7   8   9   10   >