Re: [nyphp-talk] Resize pictures before uploading

2007-07-10 Thread Anirudh Zala
On Wednesday 20 Jun 2007 21:42:13 Nelly Yusupova wrote: > Hello Everyone, > > I wrote a script that allows users to upload up to 10 photo files to the > server. The script automatically resizes the photos to the appropriate > size. The upload and resizing scripts are working perfectly. The prob

RE: [nyphp-talk] iframe Top of page?

2007-07-10 Thread Peter Sawczynec
I'm not sure I get your problem exactly, but whether you are on the web page inside the iframe or on the parent web page that contains the iframe you can force your self to a certain position on a web page by using HTML anchor tags. You put the (hidden) anchor tag at the top of your main menu: A

Re: [nyphp-talk] What's the best way to escape JavaScript data?

2007-07-10 Thread Rahmin Pavlovic
Chuck Hagenbuch wrote: > Quoting Cliff Hirsch <[EMAIL PROTECTED]>: > >> What is the best way to escape JavaScript data? > > http://php.net/json-encode > json_encode() loosely takes PHP data types and converts it to JavaScript Object Notation (JSON) -- it actually doesn't escape the data itsel

Re: [nyphp-talk] iframe Top of page?

2007-07-10 Thread Nicholas Hart
Hi, Does anyone know how to force an iframe to handle varying page lengths such that it starts back at the top of the page each time? I have a menu.php called from an iframe in index.php. This menu calls balances.php, workdues.php, etc which have varying page lengths depending on the d

RE: [nyphp-talk] advice on scaling up

2007-07-10 Thread Hans Zaunere
> How many servers will I need to handle the kind of traffic I > require? If this question is not so easily answered, then what would > be my equation for figuring this out? A friend told me he works on a > site that has 4,000,000 users and they have their system optimized to > handle 500 reques

Re: [nyphp-talk] What's the best way to escape JavaScript data?

2007-07-10 Thread Chuck Hagenbuch
Quoting Cliff Hirsch <[EMAIL PROTECTED]>: What is the best way to escape JavaScript data? http://php.net/json-encode -chuck ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online

Re: [nyphp-talk] advice on scaling up

2007-07-10 Thread Josh McCormack
I've been using Webload from Webload.org quite a since it went open source in the last couple of months. I'd highly recommend it for testing out a new system you'd set up before you put it online in production. You definitely learn a lot about how well your code scales when you load test it with a

Re: [nyphp-talk] advice on scaling up

2007-07-10 Thread Mitch Pirtle
On 7/10/07, Chris Shiflett <[EMAIL PROTECTED]> wrote: I recommend my colleague Theo Schlossnagle's book, Scalable Internet Architectures. It addresses these exact types of questions in a "teach a man to fish" sort of way. +1 Also, take a look into memcache, it's not as fast as local caches but

[nyphp-talk] What's the best way to escape JavaScript data?

2007-07-10 Thread Cliff Hirsch
What is the best way to escape JavaScript data? The PEAR JavaScript package does this: function escapeString($str) { $js_escape = array( "\r"=> '\r', "\n"=> '\n', "\t"=> '\t', "'" => "\\'", '"' => '\"',

Re: [nyphp-talk] advice on scaling up

2007-07-10 Thread Chris Shiflett
Hi Marc, > I'm a developer who has concentrated more on smaller-scale projects, > but as it turns out one of my projects is beginning to stress the > limits of a single server, and so I'm about to begin venturing into > the unknown. > > The project is currently in the "tens of thousands" of users

[nyphp-talk] advice on scaling up

2007-07-10 Thread Marc Antony Vose
Hi all: I'm a developer who has concentrated more on smaller-scale projects, but as it turns out one of my projects is beginning to stress the limits of a single server, and so I'm about to begin venturing into the unknown. The project is currently in the "tens of thousands" of users rang

Re: [nyphp-talk] Please wait, processing, message technique

2007-07-10 Thread Tim Lieberman
Never really thought about it. If your backend processes is asynchronous (or if you make it so) you could have your "progress" script just meta refresh until the back-end has a result, and then on the next refresh, 302 out of there. Cliff Hirsch wrote: For long and indeterminate page processi

[nyphp-talk] Please wait, processing, message technique

2007-07-10 Thread Cliff Hirsch
For long and indeterminate page processing, like connecting with a credit card payment gateway or calculating pi to thousands of significant digits, what is your preferred method for displaying ³please wait²? I see two techniques: 1. Use Javascript upon form submission to display the ³please wait²

Re: [nyphp-talk] Removing one element from an array

2007-07-10 Thread David Krings
Dell Sala wrote: I think you want array_splice, not array_slice. array_splice removes a section of an array an optionally replaces it with another array. It resets the keys of the array if it is numerically indexed. In your case, you leave out the replacement argument. An example in your con