Forum Moderators: coopster

Message Too Old, No Replies

Send email depends on postal code

         

vodius

9:44 pm on Apr 7, 2003 (gmt 0)

10+ Year Member


I'm kinda new in PHP and this is what I'm trying to do:
I'm trying to write a script for sending email to sertain email adrress depends on postal code user submits(Canadian postal code:A1A1A1).
I have 46 Excel files, one for each region (there are about 35 different emails, so some regions have same email).
Now, there is no any database on customer server, just PHP.
I would have to create a script and I don't know what to use: flatfile database, arrays or anything else.
I was using array beforem, it was two dimensional array where key points to array of two postal codes: smallest and greatest then , if user entered postal code is between theese two, it will open another file where there is array of ALL postal codes for this region. If postal code is there, it will send a message to coresponding email adrress. The problem is, it takes too long, about 2 minutes.
Please help me on this one, tell me how can I optimize script using something and if I could write a script which will take this information, and then process request on server even if user closes everything.
Thanks in advance.

Filipe

1:39 am on Apr 8, 2003 (gmt 0)

10+ Year Member



softclub.org

They provide a PHP class that allows you to read data from an excel spreadsheet as though it were a traditional server-side database. I haven't tried it myself though, so I can't attest to it's dependability.

Should be faster, anyway, than searching a flatfile or array.

[edited by: jatar_k at 3:00 am (utc) on April 8, 2003]
[edit reason] delinked [/edit]