[PHP] PHP program to download sites

2008-02-06 Thread Leonard Burton
HI All,

I have a client who wants to be able to download/cache all web files
on certain sites for archiving info (i.e. before purchases, anything
where a record of what exactly was on a certain page is needed).  They
would like to have this on the web server so employees could log in
and enter the sites for caching and then it can have a cron job and do
this at night.

Is there an OS program that will take a url and crawl/cache all the links on it?

If so I can easily create the interface, job queuing, and chron job setup.

Thanks,

-- 
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sending SMS via PHP

2008-02-20 Thread Leonard Burton
HI,

The vast majority of carriers have a free to use email to sms gateway for
their clients phones.

There is a list of each carriers format for the email address.  Have someone
select the carrier in the form when entering the phone number then you have
it sent to the email as specified by the carrier.

On Thu, Feb 21, 2008 at 12:01 AM, Nick Stinemates [EMAIL PROTECTED]
wrote:

 johnlin wrote:
  Let me try and answer your questions.
 
  Do you need to receive SMS? If you need to receive SMS, you will need to
  host your own GSM device or modem so that people can send you SMS.
 
  If not, you can just use internet SMS gateways like clickatell to do the
  work, and post to them by HTTP, XML or email. The cost is about 6-8
 cents
  per SMS. There are cheaper services, but not always reliable. If you
 need to
  host your own GSM device, you can use software like
 http://www.kannel.org
  (GPL Open Source) or http://www.visualgsm.com.
 
  Regards,
  SMS Gateway Expert
  http://www.visualtron.com
 
 
  AmirBehzad Eslami-3 wrote:
 
  Hi,
 
  How can i send SMS messages via PHP? How can i set SMS-headers (UDH)?
  Does anyone know some article/class/package about this issue?
 
  Thank you in advance,
  -b
 
 
 
 
 
 I know of an open source package which uses services hosted by VeriSign
 and MBlox. These cost a pretty penny, though, and may not be what you're
 after.
 The services give you a private channel for your users to interact with
 you, and for you to (potentially) respond to them.

 You're looking for SMPP packages.

 --
 ==
 Nick Stinemates ([EMAIL PROTECTED])
 http://nick.stinemates.org

 AIM: Nick Stinemates
 MSN: [EMAIL PROTECTED]
 Yahoo: [EMAIL PROTECTED]
 ==

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the survivability
of the occupants.


Re: [PHP] PHP Competition - Win a copy of Zend Studio

2007-06-15 Thread Leonard Burton

On 6/15/07, Jiffy Slides Leonard Burton [EMAIL PROTECTED] wrote:

HI Guys,

If I enter my solution, I am sure to win!

I have it figured out, but, with some of our new service offerings I
don't know that I will have the time to bang out the code.

If I don't enter the code I would love to share my outline with a
non-contestant just for the fun of talking about it.

Take care,


Leonard.

On 6/15/07, Fernando Cosso [EMAIL PROTECTED] wrote:
 Hi
 The problem is really interesting.
 I have to study physics for the university, so you will not see me in the
 competition. :(
 Best regards

 --
 [EMAIL PROTECTED]
 http://www.fernandocosso.com.ar



--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.




--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP - QuickBooks

2007-07-05 Thread Leonard Burton

Hi Daniel,

There is a QB format.  What you will have to do AFAIK is have PHP
create the file then have QB import it.  As far as Live changes, the
only thing I have even glanced at is:
http://www.devx.com/xml/Article/30482

Take care,

Leonard

On 7/5/07, Daniel Brown [EMAIL PROTECTED] wrote:

I usually don't post a question to the list, since Google is my
friend, but this is somewhat of an urgent question that I don't feel
qualified to answer 100% affirmatively.  So as I research the Internet
for some quality information, I'm hoping one (or more) of you have had
some experience in this area

Is there a simple way to interface QuickBooks using PHP, or will I
need to convert my data to a common format (such as CSV) and import it
into QB that way?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem with getting time in EST

2007-08-04 Thread Leonard Burton
HI,

Are you looking for EDT or EST?

EST = EDT -1.
EDT = EST +1

Take care,

Leonard

On 8/4/07, Crab Hunt [EMAIL PROTECTED] wrote:
 Hi,
 I need to get the current time in EST timezone while my current timezone is
 CEST. I use the function :

 date_default_timezone_set('EST')


 But now the time that I get is 1 hour less than the time in EST (
 http://wwp.greenwichmeantime.com/time-zone/usa/eastern-time/), probably
 without taking care of the daylight savings time (DST)... Can anyone help me
 out how to solve it, its an urgent issue for me.

 Thanks a lot in advance,
 regards,
 Rakesh



-- 
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Status of PHPDocWriter

2006-09-26 Thread Leonard Burton

Hi All,

Does anyone on this list know the status of PHPDocWriter?

Is it an abandoned project?

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] open source zip code geographical drill down

2006-11-03 Thread Leonard Burton

Hi Ben,


I'm trying to build some functionality commonly seen on the web where
a user enters a zip code and they are provided with a listing of
business or entity locations sorted by geographical distance.


I came up with a script to where it will do this, however, the big
question is how many distributors are there?

I can send my code to you but I have a premonition that it will
seriously choke up once the database becomes large.

Here are the steps

1) enter distributor addresses
2) find table with zip code and coordinates
3) find the formula that calculates straight line distances between
two sets of coordinates.
4) have LAMP perform its magic over the first 3.
5) then lather, rinse, and repeat.

The problem with my methodology is that it does not calculate road
distances.  Who knows how complex that would end up being.

Let me know what you find out and if you don't find out much else I
will be glad to dig out my code.  (but that might take a couple days).

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHPDIG

2006-12-11 Thread Leonard Burton

HI Guys and Gals,

Has anyone used PHP Dig lately?

Is the new version any better than it used to be?

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] reading MS Excel?

2006-12-28 Thread Leonard Burton

On 12/28/06, Jiffy Slides Leonard Burton [EMAIL PROTECTED] wrote:

HI Will,

 Is it possible to read Excel files and store the info to DB? If so how?

It is best (well depending on the application) to save the files as
.csv and then use fgetcsv.  it will allow you to parse each line and
cell in the file and then go from there.

Take Care,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.




--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Paypal IPN and PHP

2006-03-19 Thread Leonard Burton
HI All,

I am putting together an site and will accept payments via Paypal's
IPN.  I have came across many classes for this so I am curious if
anyone has any recommendations?

Does anyone know if the IPN framework has changed since 2003 as it
seems that the latest information I have on it is from 2003.  I have
looked around the Paypal site and it does not indicate when or if any
changes have been made.  I mainly need to know so if I use a 3rd pty
class I will not have to pull my hair out.

Thanks,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Invoices

2006-03-19 Thread Leonard Burton
HI All,

What do you all use for keeping track of invoices?

I looked at a few open source projects (including
http://billing-software.us/) and it seems that there is not really a
good Open Source Project out there for invoices.  Am I wrong?

What would be nice is a project with a good API that would allow other
projects to use its invoice handling capabilities.  It would be nice
if it weren't designed for one specific situation.

Have I missed the boat here?  Is there a nice OS Invoice program that
will do all this?  Has anyone considered starting one?

Thanks,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: xdiff

2006-03-24 Thread Leonard Burton
Hm, this message bounced saying 550-Spammy URLs in your message 
So I will try it again.



On 3/24/06, Leonard Burton [EMAIL PROTECTED] wrote:
 HI All,

 I started using some of the xdiff functions to keep up with differences.

 How are you all using it?

 Is there any better documentation that what I have found?  There isn't
 much documentation about it on PHP.net.

 This is a little better:

www dot wiki dot cc/php/Xdiff



 Cheers!

 --
 Leonard Burton, N9URK
 [EMAIL PROTECTED]

 The prolonged evacuation would have dramatically affected the
 survivability of the occupants.



--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bar codes

2006-04-13 Thread Leonard Burton
HI,

 Any idea how to find that bar code font or what it's called? And what
 shall I use to print it out? Is it just as a regulat font, or do I need
 some special bar code lib?

I have been using this lib for quite some time.
http://www.mribti.com/barcode/

You will have to either set register globals to on or you will have to
make a work around.

I added this to the top of image.php and it works fine:
foreach ($_REQUEST as $k = $v) {$$k = $v;}

Bascially all you will need to do is make a link to the
image.php?params=params and then you can print it out or do whatever
with it.

Hope it helps!


--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] list noise [WAS: How to find img tag and get src of image]

2006-04-25 Thread Leonard Burton
Hi guys,

RTFM answers with links to the info are fine.

I neverminded something like RTFM http://www.php.net/switch.

I have found that finding the easier answers can be the most
difficult.  I have been doing PHP for  3 years.  Sometimes there is
something simple about a function I cannot quite get.  How does an
RTFM answer help?   It does not.

An answer with the link, or exact google keywords is always more helpfull.

From pressing a few posters of RTFM answers in other projects' forums
I have found out two things:

1) most of them are script kiddies.
2) most of them do not know the answer.

They think it is more fun to post the RTFM than to not respond.

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Creating Open Office Docs with PHP

2006-04-27 Thread Leonard Burton
Hi All,

Has anyone here used PHP to create Open Office docs on the fly?

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Rhumb Lines

2006-05-05 Thread Leonard Burton

HI All,

I need to calculate Rhumb Lines in an application and have not found a
good formula for doing such.

Does anyone know of an existing Class/Function that will calculate Rhumb Lines?

Thanks and Be Well,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Video in PHP

2006-07-07 Thread Leonard Burton

Hi all,

I am researching setting up an application in PHP where it would play
various videos.

I played with PHP and Totem but it didn't work exactly as planned.

This code got the videos playing
snip
exec(totem --fullscreen million_dollar_weekend.mpeg);
exec(totem --fullscreen we_use_power_edit.mp4);
/snip

The problem here is that when the video stops totem stays open and
therefore my script does not realize that it is time to play the next
video.

Does anyone have any ideas how to get them to stop properly?

Is there another/better player than totem? Videolan does not have the
level of command line control that totem does.

Is there a pcntl function that might do the trick?

I could keep a list of the videos and lengths and then have my script
issue a kill comand once the length of time plus some play time has
ellapsed.

Thanks,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] phpdocwriter

2006-07-07 Thread Leonard Burton

HI All,

Has anyone used phpdocwriter?

Does anyone know how to get it to work with OO 2.0?

It does not seem to work and the export.sh is specific to OO1.1.1.

Does this seem to be a mostly dead project?  I didn't see much on the
forums linked to from
http://phpdocwriter.sourceforge.net/links.php?lang=en

Any ideas?

Thanks.

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] extracting foo.bar from path/to/file.php/foo.bar

2005-11-04 Thread Leonard Burton
Greetings,

What do I need to do to extract foo.bar from path/to/file.php/foo.bar

$_SERVER['REQUEST_URI'] will return the whole string but is there
anything more direct than doing a regex and 'REQUEST_URI'?

Thanks,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Template style question

2005-11-05 Thread Leonard Burton
Greetings,

HI All, I hope all is well.

I have set up a template parser.  Basically, it parses the template
and finds tags with tag_name.dat file and then includes the
tag_name.dat file.  I have considered a few other options but as of
now I think I like what I have come up with.

The only problem that I have in my design is that I have to hard code
tables in the dat file mixing php and html.  I would prefer to be able
to do something like:

[[tag with db query]]
table
trtdcolname/tdtdcolname/tdtdcolname/td/tr
trtd%var1%/tdTd%var2%/tdtd%var3%/td/tr
/table
[[/tag with db query]]

I would like it to be able to parse the line with the %var1% (which is
the column name with % or some other indicator on each side) in it and
then have it generate how many ever rows as nessecary.

Currently, my parsing engine loads the template, preg_splits() it so
each template tag is on a new line, and then passes through the
resulting array and executes the code for whatever tag is chosen.

There are a couple ideas that I have thought of but have not thought
of any real good way so I am turning to the list.

Thanks for all of your help on this list!

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] No forums?

2005-11-05 Thread Leonard Burton
HI All,

I use gmail and find it to deal with the threading quite nicely.  And
as Richie suggests I can set the filter up very easily.

I think using gmail is much better than a forum but then again, if
someone were to come up with a solution to where a distributed fourm
could be created and have it merged with the mailing list, now there
might be something useful, even if redundant.

Thanks,


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Template style question

2005-11-05 Thread Leonard Burton
Hi All,

On 11/5/05, Robert Cummings [EMAIL PROTECTED] wrote:
 On Sat, 2005-11-05 at 14:55, James Benson wrote:
  Give smarty a try rather than re-inventing the wheel
 
  http://smarty.php.net

Reinventing the wheel is much better than either the LGPL or GPL.
Writing GPL or LGPL code on PHP is just wrong.  Either keep the code
for your own use or use the PHP license.  Most of the stuff I see that
is distributed under the [L]*GPL isn't worth much.  If PHP can be
written under the PHP license why can't small little apps that is
written in PHP?  I release my code snippets (from time to time) under
either the PHP or BSD license.

Thanks for you answers.  I will look through the pear classes and see
what kind of things it is doing.


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Template style question

2005-11-08 Thread Leonard Burton
HI All,

Here is what I have done for now.

template file snippet
html
head
titletitle/title
[[header]]

[[sql sql=select user, level, ts from users order by user]]
table border=1
thead
trtdUser/tdtdClearance/tdtdTimestamp/td/tr
/thead
tbody
trtd@[EMAIL PROTECTED]/tdtd@[EMAIL PROTECTED]/tdtd@[EMAIL 
PROTECTED]/td/tr
/tbody
/table
[[footer]]
/html

/template file snippet

Fist I preg_split the template on each tag designed for the template
(i.e. [[tagname attribute=value]]).

Second, I loop through the array and if the element is pure html it
prints the line.  The lines of [[tagname]] I put the tag through a
preg_match_all() and get all of the attributes and set
$ATTRIBUTES['name']=value.

Each tag has a corresponding tag.dat file which can access the
$ATTRIBUTES array.  In the .dat file I set $TAG as an array to hold
various information about the tag that the parsing class will need to
know.

The tag.dat file will pass back any information, such as results of
SQL queries to $PASSBACK.

Once the code has been included it sees that in this instance there is
a tag with data to be imprinted so then it searches for a line with
trtd@[EMAIL PROTECTED]/tdtd@[EMAIL PROTECTED]/td/tr and then it 
loops through
the SQL results and replaces each @[EMAIL PROTECTED] with its appropriate data.

Then it prints the result and then the HTML is displayed.

It stops going through the template array when it finds another tag
starting with [[sql.  This way I can have more than one table
imprinted onto a page.

The only problem with what I have is that it only works for data being
imprinted into a table unless it is a single item being imprinted, for
which I have a seperate tag, and then it will.

This does the trick for what I have going on now but what might be
nice is to modify this so I can list the data delimited with br / or
put in a li.  I will work on this later.  For the project I am
working on I have done all that is required as far as the template
goes.  I will be able to use the template class in a number of other
apps so I will be extending it.

The biggest reason I am comming up with my own is because I want to be
able to use it under any circumstance with no regard to any term or
condition of any license and that my class is farily small with only a
very very little chance of something breaking because I couldn't find
some obscure documentation.

I wanted to avoid

What do you think?

I may rethink what I  have going on and put [[imprint]] and
[[/imprint]] tags around the data itself and then everything will get
parsed.  I am trying to avoid that as it adds a few more key strokes.

I am going to review the pear template classes some more and get some
more ideas.

Thanks and 73,


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Search Engine

2005-11-08 Thread Leonard Burton
HI All,

Has anyone on here created a search engine in PHP?

I have project to create a search engine that will search about 50K or
so pages of information on 100 or so various domain names.

What have you all done in the past?  PHPdig was a failure.

Do you recommend any of the ones that are for sale?

Thanks,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] comment more than a question

2005-11-08 Thread Leonard Burton
HI Matt,

 i
 would get the unexpected $ on line two lines past the end of the script
 error, I've figured out that actually means you are missing a closing } or
 a few
 also tonight, I was working on a script,

It will do this when you are missing a semi colon ; at the end of a
line.  The error is happening when PHP is reporting it for example:

print going to the flea market?\n
print I am going to the flea marketbr\n;

The error is not happening until line two but the problem is that you
are missing a semicolon at the end of line one.

THe problem with misplaced braces } is that since they are normally
controlling the flow of the program the error could happen anywhere.

When I see an error that says something like unexpected T_PRINT I
look one or two lines above for a missing semicolon.

If a page of code has 90 lines and it says there is an error on 89 or
90 I start to count my {} pairs and see if I am missing one.

That is why I always do silly things like:
function test(){
  do something;
  do something else;
  do more;
  do even more;
  hurry up;
  move it;
  get to work;
  ok too much undo some work;
}//end function test()

This adds a few keystrokes but believe you me it sure saves a lot of
work when it comes to complex logic.  You can then tell if you are
missing something.  One of these days I am going to write a script to
analize my code for {} pairs and then it will tell me if one is
missing.

Once you get a good feel for where the error actually happens you will
be able to easily look back and find the problem.

Take care,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Text between two tags

2005-11-10 Thread Leonard Burton
HI,

 Hello
 I'm trying to extract some text between two tags:

I am answering your question from the perspective that you are going
to have more than one column that you want the data from.

 I would use this pattern and this code to test the pattern.
?

$pattern=/(td align=\(.*)\ class=\(.*)\(.*)\/td)/;
$text='td/td
td align=right class=yfnc_tabledata3/td
td/td
td align=right class=yfnc_tabledata2/td
td/td
td align=right class=yfnc_tabledata11234/td
td/td td/td td/td td align=right class=yfnc_tabledata5/td ';


preg_match_all($pattern, $text, $matches);

print_r($matches);

?

This will give you:

[0] = Array
(
[0] = td align=right class=yfnc_tabledata3/td
[1] = td align=right class=yfnc_tabledata2/td
[2] = td align=right class=yfnc_tabledata11234/td
)

[1] = Array
(
[0] = td align=right class=yfnc_tabledata3/td
[1] = td align=right class=yfnc_tabledata2/td
[2] = td align=right class=yfnc_tabledata11234/td
)

[2] = Array
(
[0] = right
[1] = right
[2] = right
)

[3] = Array
(
[0] = yfnc_tabledata3
[1] = yfnc_tabledata2
[2] = yfnc_tabledata1
)

[4] = Array
(
[0] =
[1] =
[2] = 1234
)


THen you can loop through $matches[4] and you will get all of the
values in your row.  $mathces[3] will give you your class names and
$matches[2] will give you the alignment and $matches[1] will give you
the whole td blah blah blah /td string.

You could explode on tr and get each new row of your table in a new
element in an array and repeat the process for your entire table.

Do note that my regular expression will only return columns with a
class name and align attribute.

You can use $matches[0] elements if you are needing to replace what is
there with other information.

I hope this helps.  Please let me know if it does what you are asking
for as I am in need of good regular expression practice.

If you are needing to alter my regex some you can use
http://www.quanetic.com/regex.php to help.



--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] compiling PHP

2005-11-10 Thread Leonard Burton
HI All,

I have been digitizing a bungh of 35 mm slides for a client and making
a static index and putting all of this on a CD.

They are getting to the stage where they would like it to be at least
somewhat dynamic.  On my laptop I have installed XAMPP and it seems to
work decently well.

Is there some distribution of PHP (similar to XAMPP) to where I could
have it load up PHP (or at least a subset of it) so I could then have
the autortun file open the browser to a file so I can provide them
dynamic content based in PHP?

XAMPP is not an option due to it potentially confusing the client.

What do you all think?

73,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Template Question

2005-11-14 Thread Leonard Burton
HI All,

In your template parsing classes do you put the code for tags in
seperate files or do you have some kind of array or other method of
assigning the action associated with the tag?

I have been putting the code for the tags in a dat/tag.dat file and
then including the file wherever the tag is called.  For good measure
I call the attributes in the tags (which a returned by a regex) as
$ATTRIBUTES['name']. and then any data needing passed back from the
code in the tag I call $PASSBACK['name'].

Does this seem standard?  I have looked through a few template parsing
classes and feel it is easier to come up with my own than it is to use
most of them.

Thanks,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Validating Email addrs

2005-11-15 Thread Leonard Burton
Hi All,

I know that it is pretty darn impossible to come up with a regular
expression for validating emails.

How do you all validated emails on form submission?

Is it good just to do something like /[EMAIL PROTECTED]/  ?  That (or a
close derivative) should match that there is at least a @ and a . with
chars before and after each.  I will be sending an email to each new
registration with a confirmation link.

Does that regex make about the best sense?

Thanks and 73,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Is echo tag reasonably portable?

2005-11-15 Thread Leonard Burton
HI All,

 Every server I work on is set to not allow short tags, and I work on
 about 7 different state, federal, and commercial ones.

Why turn off short tags? Does that make things more secure?

Thanks,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Validating Email addrs

2005-11-15 Thread Leonard Burton
Hi Greg, all,

 http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html

That is a heck of a regex there. I am going to have to experiment with
that one a little bit.

Thanks for the replies to my post here.


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Regex for Amateur Radio Callsigns

2005-11-15 Thread Leonard Burton
Hi All,

Does anyone know of a regex to work for Amateur Radio Callsigns that
will work with any from across the world?

Thanks and 73,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Regex for Amateur Radio Callsigns

2005-11-15 Thread Leonard Burton
HI Curt,

Thanks for the reply,

 What does a amateur radio callsign look like? And in what context
 are you trying to parse this callsign?

Basically here is the regex I used (I am not the best with regexes):

$pattern = /^[0-9]?[A-Z]{1,2}[0-9][A-Z]{1,3}/;

Here are how they look
W1W
W1AW
WA1W
AD4HZ
N9URK
WB6NOA
4N1UBG

I guess this would be better?

$pattern  = /^;
$pattern .= ([0-9][A-Z][0-9][A-Z]{3})|; //4N1UBG
$pattern .= ([A-Z][0-9][A-Z]{1,3})|;//N9URK, W1AW, W1W
$pattern .= ([A-Z]{2}[0-9][A-Z]{1,3}); //WB6NOA, AD4HZ, WA1W
$pattern .= /;

I am still trying to master regexes.  Is there a better way to do this?

THanks,



--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Regex for Amateur Radio Callsigns

2005-11-15 Thread Leonard Burton
HI Curt,
  W1W
  W1AW
  WA1W
  AD4HZ
  N9URK
  WB6NOA
  4N1UBG
 Ok, so i can conclude so far we have alpha numeric chars minimum of
 3 chars up to 6, this would make a regex:
   /[A-Z0-9]{3,6}/

The only problem with this is that it would take 444 which is not a
valid call.
  $pattern  = /^;
  $pattern .= ([0-9][A-Z][0-9][A-Z]{3})|; //4N1UBG
  $pattern .= ([A-Z][0-9][A-Z]{1,3})|;//N9URK, W1AW, W1W
  $pattern .= ([A-Z]{2}[0-9][A-Z]{1,3}); //WB6NOA, AD4HZ, WA1W
  $pattern .= /;
 
  I am still trying to master regexes.  Is there a better way to do this?

 For one trying to master regex's you seem to have a good grasp on
 it.

Thanks for the support.  I think I can do regex's pretty well but I do
not have a mastery of them yet.

 If this pattern works according to the specs of a callsign, it
 should work fine. You could try to combine the regex into one
 statment (without the | condition) but that would make the regex
 rather ugly.

I am looking for a regex that I can use for both preg_split and
preg_match.  I have not yet really learned how to do preg_splits yet. 
I am still trying to figure out what in the world to do.   I have done
some preg_splits and I know enought to know that if you have more than
one set of () that will return on an expression then it will royally
mess things up.

 One thing i would suggest, although probably a minor issue
 considering how long the string is,  is to make sure you put the
 most likely match in your first pattern to match.

Actually that is a good suggestion.  I can see how it would make
things more efficent.  Should you order the whole expression in terms
of how likely it is to get a result?
(i.e. /^(most)|(frequent)|(least)/)

Thanks for the help!

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[2]: [PHP] Regex for Amateur Radio Callsigns

2005-11-16 Thread Leonard Burton
HI,

 Tuesday, November 15, 2005, 8:39:19 PM, you wrote:
  Here are how they look
  W1W
  W1AW
  WA1W
  AD4HZ
  N9URK
  WB6NOA
  4N1UBG

 Let's do it this way... What are the rules for a valid callsign?

Basicly, you see an example of each different type of callsign.  Other
than the patterns you  see above there are no real rules.  A letter in
the example above means that there can only be a letter in the spot
and a number in a spot means there can only be a number in that spot. 
There are 7 different formats and you see the one above.

Did you see the regex I had in a previous post?

Thanks for your response.

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] MySQL C API

2005-11-18 Thread Leonard Burton
HI All,

Does anyone on here use the MySQL C API?  Would you mind if I asked
you a few questions off the list?

Thanks,


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] custom CAD directory/file browser

2005-11-30 Thread Leonard Burton
Greetings,

I think what I need is for the
 php script to call itself and pass the name of the new directory so the
 new directory can be queried and displayed.

Let me see if I got this right.

You have Dir x, y, z, w.  In each dir you have files 1 through n.

What you want to do is loop through each dir and then loop through
each drawing and look for some pattern in the title block and then
append the query info there.

If this is the case: you should use chdir() to change dirs.  Then you
can readdir() and loop through the files.

Does this help?

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

You must understand, if you are on a plane you must behave yourself.

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CSS and TablesL

2005-12-10 Thread Leonard Burton
Since we are talking CSS and Tables one of the first things I do when
I come across a site that is blatantly using CSS is to resize the
text.  I find that in about 80% of the cases the pages are not
designed to handle resizing the text, which is a big pain.

This is why I tend to stay with tables in a lot of my deisgn.  I have
done a few CSS things here and there but it takes too long to do it
properly.  That is one thing I notice is convieniently left out of the
tutorials.  If they don't know about ctl+ why would I waste time
reading their tutorial?  When I come across a tutorial on replacing
tables with CSS I look to see if it mentions the user resizing the
text.  If I cannot find that I close the tab.

What is the surefire way to have divs and spans that will resize along
with the text?

Thanks,
--
Leonard Burton, N9URK
[EMAIL PROTECTED]

You must understand, if you are on a plane you must behave yourself.

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Container Loading Script

2005-12-12 Thread Leonard Burton
HI all,

I am working on a project where it would be nice to be able to create
a load plan for a semi trailer or ocean container.  There are some
commercially available programs to do this in windows but nothing in
PHP.

Does anyone know of a PHP script that will do this?

Basically it needs to know the size of the trailer and the size of the
items being loaded and then it will go through and create a load based
upon the density of each piece and distribute the weight evenly across
the trailer and fill the trailer up.

Thanks,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

You must understand, if you are on a plane you must behave yourself.

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Money format--concatenate?

2003-01-30 Thread Leonard Burton
I hope this helps.

Have you thought of concatenation?

$a=spritf(however you set it up to get your decimals and comas)
$b=£.$a;

Will that not work?

Leonard.

-Original Message-
From: V Dub [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 30, 2003 9:45 PM
To: Ben Edwards
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Money format


http://php.net

search in functions for number_format

Cheers!

Quoting Ben Edwards [EMAIL PROTECTED]:

### I wish to format money with a £ sign, two decimal places and commas
### separating thousands. I seem to be able to do the £ and decimal places
with
###
### sprintf or use money_format to do the commas but cant find how to do
### both/combine them.
###
### any insight,
### ben
###
### 
### * Ben Edwards  +44 (0)117 968 2602 *
### * Critical Site Builderhttp://www.criticaldistribution.com *
### * online collaborative web authoring content management system *
### * Get alt news/views films online   http://www.cultureshop.org *
### * i-Contact Progressive Video  http://www.videonetwork.org *
### * Smashing the Corporate image   http://www.subvertise.org *
### * Bristol Indymedia   http://bristol.indymedia.org *
### * Bristol's radical news http://www.bristle.org.uk *
### * PGP : F0CA 42B8 D56F 28AD 169B  49F3 3056 C6DB 8538 EEF8 *
### 
###


--
Richard Whitney
Transcend Development
Producing the next phase of your internet presence.
[EMAIL PROTECTED]
http://xend.net
602-971-2791

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Sending plain text data in a table with mail()

2003-01-30 Thread Leonard Burton
Greetings,

I am having trouble with the following code.  I am trying to make a table in
plain text to send via email.  I get the data frm a MYSQL table and then put
it into an array.  I find the max strlen and subtract each individual
customer name strlen from that and add that many spaces.  Such that if Max
was 10 and a particular one was 3 it would add 7 spaces.  It works fine most
of the time but my customer fwd me an email where it wasnt.

Can someone suggest a better way?  I wonder if I have the cart in front of
my horse but Im not sure of any better way.

I appreciate any help.

Thanks,

Leonard.
www.phpna.com


//Get data from tables
if ($result[1])
{
while ($row = mysql_fetch_array($result[1]))
{
$cust = $row[customer];
$cust = get_acct_names($cust, customer);
$data[$z][cust]=$cust;
$data[$z][strlen]=strlen($cust);
//Get longest customer string
if ($data[$z][strlen]  $data[1][$z-1][strlen])
{
$maxstrlen=strlen($cust);
}

$data[$z][date]=the_big_date($row[date], /);
$data[$z][amount]=$.number_format($row[amount], 2);
$z++;

}
mysql_free_result($result[1]);
}


$msg[$i]=Revenue for $mon $yr\n;
$i++;

for ($y=0; $y  $z; $y++)
{
//Find String Length Difference
$deltastr = $maxstrlen - $data[$y][strlen];
$cust_str .= repeater( , $deltastr);

$cust = $data[$y][cust].repeater( , $deltastr);

$msg[$i]=$data[$y][date].\t\t.$cust.\t\t.$data[$y][amount].\n;

$i++;
}

Leonard.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] question on listbox.

2003-02-01 Thread Leonard Burton
Might this be better?

print select name=category_selection\n;
print option value=0Select Category/option\n

//Query 
$sql=SELECT DISTINCT CategoryName From Categories ORDER BY CategoryName;
$result=mysql_query($sql);
if ($result)
{
While($Category=mysql_fetch_array($result))
{
PrintOPTION VALUE=\$Category['auto']\$Category['name']/option\n;
}
mysql_free_result($result[$a]);
print /select\n;
}


Leonard.
www.phpna.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Help with classes (oop)

2003-02-03 Thread Leonard Burton
Greetings,

I am trying to figure out using classes.  I have read and read and read
about them but still cannot figure them new fangled things out.  Could
someone please alter this snippet just a bit so it would be a correct test
script with a call to it?

When  I run the script I get this in my browser 

Warning: Missing argument 1 for first() in /usr/~index.php on
line 8
Warning: Missing argument 2 for first() in /usr/~/index.php
on line 8
35chris


As you see it does print the output.  What am I doing wrong?

Thanks,

Leonard
[EMAIL PROTECTED]



? php;
class first
{
var $age;
var $name;

function first($age, $name)
{
return $age.$name;
}
}

//main script
$first = new first;
$test=$first-first(35, chris);

print $test;


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Help with classes (oop)

2003-02-03 Thread Leonard Burton
Thanks for all the help thusfar.  Classes are just not something I am
understanding.  I have read the sections on classes in several books and the
www.php.net section on them and still am missing something.  It seems that
these books have been telling me what a light switch is used for but not how
to use one.

So would I call the class like this?

$first = new first;
$first-setData(35, chris);
$test=$first-returnData;
print $test;


Thanks again,

Leonard.


Just as a refresher here is the class.

class first
{
var $age;
var $name;

function first()
{
  $age = 0;
  $name = '';
}
function setData( $age, $name )
{
  $this-age = $age;
  $this-name = $name;
}

function returnData()
{
  $retval = '';

  $retval  = $this-age;
  $retval .= $this-name;

  return $retval;

}
}
-Original Message-
From: Johannes Schlueter [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 2:59 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Help with classes (oop)


On Monday 03 February 2003 20:45, Chris Boget wrote:
 function setData( $age, $name )
 {
   $age = $age;
   $name = $name;
 }

Is useless ;-) I think you wanted this:

 function setData( $age, $name )
 {
   $this-age = $age;
   $this-name = $name;
 }


johannes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Thanks for help with classes

2003-02-03 Thread Leonard Burton
Hey Guys,

Thanks for all the help with classes.  I think I can now turn the
lightswitch on.

Leonard Burton
[EMAIL PROTECTED]
www.phpna.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Which link was selected?

2003-02-03 Thread Leonard Burton
Greetings,

You ought to make your link something like
www.foo.com/products.php?autoid=105.  and then make a query on your page
that displays the pics based on an autoincrement number in your table.

You ought to be able to make the code something like:

//Display link for product
print a href=products.php?autoid=.$row[autoid].;
print img src=images/.$row[product_pic]./a;


ON your products.php page youd want to have code something like;

if ($auto)
{
$result = select * from product_info where autoid=$autoid

if ($result)
{
while ($row = mysql_fetch_array($result))
{
$stuff=$row[stuff];
$stuff1=$row[stuff1];
$stuff2=$row[stuff2];
$stuff3=$row[stuff3];
}
mysql_free_result($result);
print All that stuff here;
}
else
{
include product_display_page.php;
}

I hope it helps.

Leonard.

-Original Message-
From: Karina S [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 2:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Which link was selected?


Hi,

I put pictures from a database ont the page about my products. If the user
click on a picture I want to give a detailed description about the product.
But how can I get, which picture was selected?

Thanks



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Which link was selected?

2003-02-04 Thread Leonard Burton
Good Catch,

Be just as an advisement besure to escape those quotes with a backslash \

Leonard.

-Original Message-
From: Götz Lohmsnn [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 4:09 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Which link was selected?


Leonard Burton schrieb:
 Greetings,

 You ought to make your link something like
 www.foo.com/products.php?autoid=105.  and then make a query on your page
 that displays the pics based on an autoincrement number in your table.

 You ought to be able to make the code something like:

 //Display link for product
 print a href=products.php?autoid=.$row[autoid].;
 print img src=images/.$row[product_pic]./a;


 ON your products.php page youd want to have code something like;

 if ($auto)
 {
   $result = select * from product_info where autoid=$autoid

   if ($result)
   {
   while ($row = mysql_fetch_array($result))
   {
   $stuff=$row[stuff];
   $stuff1=$row[stuff1];
   $stuff2=$row[stuff2];
   $stuff3=$row[stuff3];
   }
   mysql_free_result($result);
   print All that stuff here;
   }
   else
   {
   include product_display_page.php;
   }

 I hope it helps.

 Leonard.


ups .. someone was quite faster than me in answering ... and it looks quit
better than my way ... the only thing I want to note ... use  arround
values
of HTML tags ;-)

--
 @  Goetz Lohmann, Germany   |   Web-Developer  Sys-Admin
\/  --
()  He's the fellow that people wonder what he does and
||  why the company needs him, until he goes on vacation.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] tracking bulk email

2003-02-04 Thread Leonard Burton
What about making the log a .txt file and not a database?  Wouldnt that be
quicker?

Leonard.

-Original Message-
From: Lowell Allen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 7:27 AM
To: PHP
Subject: Re: [PHP] tracking bulk email


 From: Kevin Stone [EMAIL PROTECTED]

 - Original Message -
 From: Lowell Allen [EMAIL PROTECTED]

 I've added an email feature to a content management system that will send
 plain text email to about 1400 contact addresses. Each contact is sent a
 separate email with the contact name and address in the To: header. It
 works fine to small test lists, but hasn't been tested with a large list.

 Although I think list posts should only pose one question, I have two:

 (1) My client is nervous about the script failing mid-list and not being
 able to determine which contacts were sent mail. I need to build this
 check into the content management system. I could write a flag to the
 database every time mail() returns true, but that would mean 1400
database
 updates! If I instead append to a variable each time through the mail()
 loop, I'll lose the record if the script times out. Can anyone suggest
how
 to record the position in a loop if a time out or failure occurs?

 (2) In order to avoid the script timing out, I'm counting the number of
 mail() attempts and calling set_time_limit(30) every 50 attempts to
 provide another 30 seconds of script execution time.

[snip]

 In response to your first question.  File stores are something a computer
 does very very fast (might want to add some error catching to this)..

 $i=0
 while() {
 count_index($i)
 $i++;
 }

 function count_index ($i) {
 $fp = fopen('count.txt', 'w');
 fwrite($fp, $i);
 fclose($fp);
 }

Thanks, Kevin. I've put a counter in place within my mail loop. It seems to
slow the process, but perhaps not too much. And thanks to Mark McCulligh for
describing a system for sending about 1500 messages that's called with a
cron tab and writes to a db after each mail. And thanks to Chris Hayes for
pointing to relevant list archives. My system seems to be working, but it's
so slow that I'm going to look at using a cron tab and saving everything to
a database for easier reference in case of failure mid-list.

--
Lowell Allen


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Function to make a select box

2003-02-04 Thread Leonard Burton
Greetings,

In several scripts that I have written I have had to have a similar select
box.  It will select from a table an auto number field and a name field
(like an id # and a customer name) and then it will display the name on the
screen and the variable posted will be the auto #.

Could anyone offer any suggestions?  The following function prints a blank
select box.



function select_box($name, $table, $field, $value)
{
print select name=\$name\\n;
$result= select auto, '$field' from '$table' order by '$field' order by
name asc;
$result= mysql_query($result);
if ($result)
{
while ($row = mysql_fetch_array($result))
{
print option value=.$row[auto];
if (($value != no)  ($value==$row[auto]))
{
print  selected;
}
print .$row[$field]./option\n;
}
mysql_free_result($result);
}
print /select/tdtd\n;
}


Here is a working example that is not in a function:

//Get Existing Accounts and put them in a select box
print select name=account\n;
$result= mysql_query(select * from ledger_accounts order by name asc);
if ($result)
{
while ($row = mysql_fetch_array($result))
{
print option value=.$row[auto];
if ($account==$row[auto])
{
print  selected;
}
print .$row[name]./option\n;
}
mysql_free_result($result);
}
print /select/tdtd\n;



Thanks,

Leonard Burton
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Object oriented Programming

2003-02-05 Thread Leonard Burton
Creating functions is a real easy part of programming.  Classes are a
differect story (or at least at first).  Anyway,  If I were you, I would get
Professional PHP4 by Wrox and read the OOP section.  I would first start
writting functions.

Think if it like this, if you use exact code twice (you cut and paste it)
write a function.   If you use code that is ninety or eighty percent similar
make a function.  Figure out how to do that and then worry about classes.

The problem with books on classes are that they tell you how/when to use a
lightswitch but they dont tell you how to turn it on. I have been thinking
about writing an article about how to turn the figurative light switch on
when it comes to classes.

Have you been writting functions?

Cheers!

Leonard.

-Original Message-
From: Sascha Braun [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 3:22 AM
To: PHP General list
Subject: [PHP] Object oriented Programming


Hi,

I need a basic Tutorial on how to write objectoriented Scripts in PHP,
like classes and functions I can use at many places.

If there is something like that, please tell me where I can find it (Book
or Web).

Thank Ya'll

Sascha


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Variable Problem

2003-02-05 Thread Leonard Burton
You need to put quotes around the vars.

If I were you I would do this:

print input type=text name=sent value=\$sent\;
print input type=text name=name value=\$name\;


You need the quotes.

Leonard.
www.phpna.com

-Original Message-
From: Sierra Times.com [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 3:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Variable Problem


I have a variable that get's chopped off at the %20 character.

In the form page I have:
bFrom: ?= $name;?
  brE-mail address: ?= $email;?br
   ?= $sent;?/b/font/td

$sent and $name shows up fine, but immedieately I added (for testing)

input type=text name=sent value=?= $sent;?
input type=text name=name value=?= $name;?

this statement shows a text box, with only the first word before the space
charcter %20 is shown, and is fact the only data that is submitted upon:
form action=?=$PHP_SELF;? method=post

Can someone assist me?

J.J. Johnson



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] http://www.act.com---CRM

2003-02-14 Thread Leonard Burton
Has anyone used ACT or tried to integrate it with any other applications?  I
need some advice, please respond.


Thanks,


Leonard.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] What is $this-

2007-02-18 Thread Leonard Burton

HI,


$this-SetFont('Arial','B',15);


what you include is a snippet from a class.  Here is a brief into to
how a class works, sort of like a function.  The $this refers to the
class from inside of the class.

?php

class write{

var $message;

function set($message){

  $this-$message = $message;
}

function display(){

 print $this-message\n;
}

}// class write

//actually use the class
$class = new write();
$class-set(This is a test message);
$class-display();

?

I hope this helps.

Leonard


--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What is $this-

2007-02-19 Thread Leonard Burton

oops, typo.

Should have been $this-message.

Leonard

On 2/18/07, André Medeiros [EMAIL PROTECTED] wrote:

Actually, $this-$message would be wrong, but the concept is right.

On 2/19/07, Leonard Burton [EMAIL PROTECTED] wrote:
 HI,

  $this-SetFont('Arial','B',15);

 what you include is a snippet from a class.  Here is a brief into to
 how a class works, sort of like a function.  The $this refers to the
 class from inside of the class.

 ?php

 class write{

 var $message;

 function set($message){

$this-$message = $message;
 }

 function display(){

   print $this-message\n;
 }

 }// class write

 //actually use the class
 $class = new write();
 $class-set(This is a test message);
 $class-display();

 ?

 I hope this helps.

 Leonard


 --
 Leonard Burton, N9URK
 http://www.jiffyslides.com
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]

 The prolonged evacuation would have dramatically affected the
 survivability of the occupants.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php






--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Name Capitalization

2007-03-19 Thread Leonard Burton

HI All,

Does anyone use a library to properly capitalize last names?

For instance, McDonald needs to remain that way even if it comes in as
MACDONALD, or macdonald.

Of course I can write it on my own but would prefer not to reinvent the wheel.

Thanks,

--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Name Capitalization

2007-03-19 Thread Leonard Burton

HI Guys,

Oops, I messed this request up.

It should have read:

For instance, McDonald needs to remain that way even if it comes in as
MCDONALD, or mcdonald.


probably any wheel out there is going to be fairly lame, yours included,
no offence meant as to your skills, it's just that I believe the task is
nigh on impossible - and I'm not the only one (to quote John Lennon).
this was discussed on this list within the last 7 days.


Yeah, nothing is a perfect solution but anything is better than nothing.

Guys, Thanks for the replies and the link to the recent thread, even
though that didn't discuss any solutions to the problem I am asking
about (other than to point it out which helps because it points out a
few of the name problems)!

Would anyone care to work on this project together?

Thanks,

Take Care,

--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name Capitalization

2007-03-19 Thread Leonard Burton

HI Chris,


Here is one option. Make a long list (array) of search/replace pairs and
loop through your text replacing as necessary.

'mcdonald' = 'McDonald'
'mcdowell' = 'McDowell'
'o\'reilly' = 'O\'Reilly'
'de la rosa' = 'De La Rosa'
etc ad nauseum...


I think the better solution would be some pregs that would go through
and look for mc then have it turn the name into Mc then Capitalize
the next letter. [same thing for mac]

Then Do the same thing with O'Henry it would look for o\'  then it
would turn it into O'  and capitalize the H.


Let us know when you're done! :)


This project shouldn't be that hard as there are probably only 10 to
15 rules for names.

Take Care,

--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name Capitalization

2007-03-19 Thread Leonard Burton

HI Paul,

Thanks for the reply.


Applying capitalization rules to names by itself is easy.  What
defeats the effort is that there are no consistent rules for name
capitalization, only inconsistent ones.


What my case is that I have came across a list of names that I need to
use and all of the names were in caps.  From there anything is a step
in the right direction.

As you know, anytime you parse anything in bulk there will be
exceptions to the rule.

My goal would be to just pick the most common usage.  If von Dielengan
is supposed to be VonDielengan in one case or Von Dielengan in another
is ok, it can be manually retouched later.

The CPAN class that someone posted earlier has some good points except
its not in PHP.

I will be working on some code sometime over the next 3 to 5 days and
might send it to you if you are willing to look at it.

Also, this would be a good work around for those moogles that must use
ALL CAPS ALL THE TIME ;).  It could give them the choice to pick the
right capitalization.

Take Care,

--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cheap Ping

2007-04-13 Thread Leonard Burton

HI


I am trying to find a simple way to test to see if a web site
is up or not.



What about analyzing the results from exec(ping www.domain.ext); ?


--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] CSS vs. Tables

2007-04-17 Thread Leonard Burton

HI All,


From the CSS discussion of the WWE job posting thread.


There is one question that shows that a table based layout in 99% of
cases is superior to a CSS layout.

Try resizing most any CSS based page.

Tables are 99% of the time superior as it will resize properly whereas
99% of most CSS based pages will not resize properly.

When 99% of CSS layouts overcome this lunacy then CSS will be better,
but not until then.

--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Preventing SQL Injection/ Cross Site Scripting

2007-04-20 Thread Leonard Burton

Hi Dotan,

Why not use mysql_escape_string()?

On 4/20/07, Dotan Cohen [EMAIL PROTECTED] wrote:

I've got a comments form that I'd like to harden against SQL Injection
/ XSS attacks. The data is stored in UTF-8 in a mysql database. I
currently parse the data as such:

$_POST[commentform]=str_replace (', '', $_POST[commentform]);
  //q-qq
$_POST[commentform]=str_replace (--, , $_POST[commentform]);
 //-- - x
$_POST[commentform]=str_replace (;, , $_POST[commentform]);
//; - x
$_POST[commentform]=str_replace (=, '', $_POST[commentform]);
  //= - x
$_POST[commentform]=preg_replace (/java/i, '', $_POST[commentform]);
$_POST[commentform]=preg_replace (/script/i, '', $_POST[commentform]);
$_POST[commentform]=preg_replace (/src=/i, '', $_POST[commentform]);
$_POST[commentform]=preg_replace (/src =/i, '', $_POST[commentform]);
$_POST[commentform]=preg_replace (/iframe/i, '', $_POST[commentform]);
$_POST[commentform]=preg_replace (/rel=/i, '', $_POST[commentform]);
$_POST[commentform]=preg_replace (/rel =/i, '', $_POST[commentform]);
$_POST[commentform]=preg_replace (/href=/i, '', $_POST[commentform]);
$_POST[commentform]=preg_replace (/href =/i, '', $_POST[commentform]);
$_POST[commentform]=preg_replace (//i, '', $_POST[commentform]);
$_POST[commentform]=htmlspecialchars( mysql_real_escape_string
($_POST[commentform]) );

The first statement doubles up quotes, it's a bit difficult to see in the code.

After seeing this:
http://ha.ckers.org/xss.html
and another similar one for SQL injection, I'm worried that my filters
are not enough. What do the pro php programers out there use?

Thanks in advance.

Dotan Cohen

http://lyricslist.com/
http://what-is-what.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Name Capitalization

2007-04-29 Thread Leonard Burton

Hi Paul,

[comments below inline]

On 3/19/07, Paul Novitski [EMAIL PROTECTED] wrote:

At 3/19/2007 07:17 PM, Leonard Burton wrote:
What my case is that I have came across a list of names that I need to
use and all of the names were in caps.  From there anything is a step
in the right direction.

As you know, anytime you parse anything in bulk there will be
exceptions to the rule.

My goal would be to just pick the most common usage.  If von Dielengan
is supposed to be VonDielengan in one case or Von Dielengan in another
is ok, it can be manually retouched later.

The CPAN class that someone posted earlier has some good points except
its not in PHP.

I will be working on some code sometime over the next 3 to 5 days and
might send it to you if you are willing to look at it.


Sure, it sounds like fun.  I've written de-cap routines before for
whole addresses, names included.  It's an amusing challenge to
whittle down the error rate.

I'll be interested to compare notes on strategies for implementing
this efficiently in PHP.


I have set up a Google Code Page for this project.
http://code.google.com/p/lastname

Initially I had a coder translate the project to PHP.

What do you think of how it is implemented?

Would you still like to help work on it?

Thanks and take care,

--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A Tool For Building PHP Web Apps

2009-04-10 Thread Leonard Burton
Correct me if I am wrong, but wasn't there a few PHP code generators
that did what the OP is asking?

I remember hearing about Code Generation a few years ago, but that has
been about it.

On Fri, Apr 10, 2009 at 9:48 AM, Paul M Foster pa...@quillandmouse.com wrote:
 On Fri, Apr 10, 2009 at 09:01:14AM -0400, Bob McConnell wrote:

 From: Paul M Foster
 
  Here's a hairbrained idea I was kicking around. I object to the idea
 of
  including 15 or 30 files in a PHP application just to display one page
  on the internet. It makes the coding faster, but it makes the display
  slower and seems silly to me.
 
  So what if you had a tool or a set of tools where you could write code
  snippets and such, and then hit a button or issue a command, and
  everything you specified got written into a single file? You'd specify
  that this page needs to read the config, set up a database connection,
  validate these fields, etc. When you were done, it would write all
 this
  code to a *single* file, which the user would invoke by surfing to
 that
  page. The resulting code would be *static*, not like what results from
  most templating systems. So rather than specify a specific variable
  value in the resulting file, it would embed the PHP code to display
 the
  variable, etc.
 
  What might be the liabilities of something like that? Would there be
  security issues? Would there be increased difficulty in debugging?
 What
  can you think of?

 Programs to do that used to be called compilers. There is an entire
 branch of computer science and a lot of tools (lex, yacc, etc.)
 dedicated to that topic.

 I know compilers. I've coded in C for years. I'm not talking about a
 compiler here. It's more an aggregator. The resulting page would still
 be php/html, but everything needed in it would be self-contained (except
 the web server and PHP interpreter). Kind of like what make does,
 except that make typically invokes the compiler to mash it all into one
 executable at the end.


 It's not a bad idea, but there is one precarious assumption that
 underlies it. Can you absolutely guarantee there will never be a second,
 or third, or more pages on that server that will need some of those
 functions or classes? As soon as the site begins to evolve and grow, you
 will have multiple copies of many of those snippets, and when (not if)
 you need to modify them, you will have to find and change every single
 copy.

 So you need to ask yourself if this strategy is maintainable in your
 case. And will it make any real difference in the end?


 Good point. That's why I asked the question in the first place. Every
 time you revised a supporting file, you'd have to regenerate all the
 files that depended on it. Might be okay for a small site, but could be
 a nightmare for a large site.

 Paul

 --
 Paul M. Foster

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
Leonard Burton, N9URK
http://www.jiffyslides.com
serv...@jiffyslides.com
leonardbur...@gmail.com

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] https and Credit Cards

2009-04-14 Thread Leonard Burton
Sounds like your client wants to end up listed in a Terminated Merchant File.


On Mon, Apr 13, 2009 at 11:19 PM, Skip Evans s...@bigskypenguin.com wrote:
 Hey all,

 I've always put any forms that collect credit card information behind a
 secure connection, https, figuring that sending that information from the
 client browser to the server should be secure, but I'm having convincing a
 client that it is necessary.

 He instead insists that only the call to the credit card processor's server
 needs to be secure and of course the processor supplies the connection
 there.

 But doesn't also the form need to be secure since you're sending CC
 information from that form back to the web site's server?

 That's what I've always assumed.

 I need some opinions on this, and if I'm right I think the client will defer
 to a few more votes.

 --
 
 Skip Evans
 Big Sky Penguin, LLC
 503 S Baldwin St, #1
 Madison WI 53703
 608.250.2720
 http://bigskypenguin.com
 
 Those of you who believe in
 telekinesis, raise my hand.
  -- Kurt Vonnegut

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
Leonard Burton, N9URK
http://www.jiffyslides.com
serv...@jiffyslides.com
leonardbur...@gmail.com

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Need Your Help :) I'm Just About Creating File Uploading Service

2009-04-16 Thread Leonard Burton
http://aws.amazon.com/s3/

On Thu, Apr 16, 2009 at 3:10 PM, Nitsan Bin-Nun nit...@binnun.co.il wrote:
 What is Amazon SSS??

 On Thu, Apr 16, 2009 at 8:59 PM, Leonard Burton leonardbur...@gmail.com
 wrote:

 Why not use something like Amazon SSS and not worry about a lot of the
 details?

 On Thu, Apr 16, 2009 at 2:29 PM, Nitsan Bin-Nun nit...@binnun.co.il
 wrote:
  Hi List,
 
  I have been thinking for a while about setting up my own
  rapidshare.comclone,
  Few days back I went really serious with this and came up with some
  ideas.
 
  This is where I need your help, my partner and I have been thinking
  about
  the
  system that the website should run on.
  We came to conclusion that we are going to write it in PHP.
 
  There are several issues that came up during the mind-storm:
  First, how we can keep the files out of being published as direct links?
 
  My first idea was to host them one directory up from the http directory.
  It seems good but how I would deliver the files to the users?
  We are talking about unlimited file-size hosting so that means that we
  will have to stream the files somehow... and they will be BIG (it's
  defendant,
  about 700MB~ each)
 
  We thought of letting users pay by SMS'es, whats your ideas about it?
 
  I'm generally looking after a do and NOT do list of creating a file
  hoster ;)
  If you have any general ideas / precautions that would definitely make
  my
  partner and I happy :)
 
  Thanks in Advance,
  Nitsan
 



 --
 Leonard Burton, N9URK
 http://www.jiffyslides.com
 serv...@jiffyslides.com
 leonardbur...@gmail.com

 The prolonged evacuation would have dramatically affected the
 survivability of the occupants.





-- 
Leonard Burton, N9URK
http://www.jiffyslides.com
serv...@jiffyslides.com
leonardbur...@gmail.com

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Imagick morphImages

2013-03-11 Thread Leonard Burton
HI,

*Imagick::morphImages* ( int $number_frames )

http://php.net/manual/en/imagick.morphimages.php


Would someone please reply with how to add the two images for this?

None of the search results come back with anything other than the
auto-generated info on the imagick class.

Many Thanks!



-- 
Leonard Burton, N9URK
leonardbur...@gmail.com

The prolonged evacuation would have dramatically affected the
survivability of the occupants.


Re: [PHP] PHPDIG

2006-12-11 Thread Jiffy Slides Leonard Burton

Thanks for the Google Tip.

That is what I will use.  Much easier as I don't think we will have 5,000 sites.

Leonard

On 12/11/06, Saqib Ali [EMAIL PROTECTED] wrote:

r u planning to use it for intranet site or a internet site?

if for a internet site: try http://www.google.com/coop instead of
phpDig or HTDig

saqib
http://www.full-disk-encryption.net

On 12/11/06, Leonard Burton [EMAIL PROTECTED] wrote:
 HI Guys and Gals,

 Has anyone used PHP Dig lately?

 Is the new version any better than it used to be?

 --
 Leonard Burton, N9URK
 [EMAIL PROTECTED]

 The prolonged evacuation would have dramatically affected the
 survivability of the occupants.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




--
Saqib Ali, CISSP, ISSAP
http://www.full-disk-encryption.net




--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] reading MS Excel?

2006-12-28 Thread Jiffy Slides Leonard Burton

HI John,

My reply was made in ignorance of the php classes that will read excel
documents.

I would follow that road and not my advice!

Leonard.

On 12/28/06, John Meyer [EMAIL PROTECTED] wrote:

On a side note, but going on the basis that the users are uploading .xls
files and don't understand how to convert.  Would it be better to use
php's routines or to automate excel, convert it inside there, and then
use the result?
Leonard Burton wrote:
 On 12/28/06, Jiffy Slides Leonard Burton [EMAIL PROTECTED] wrote:
 HI Will,

  Is it possible to read Excel files and store the info to DB? If so how?

 It is best (well depending on the application) to save the files as
 .csv and then use fgetcsv.  it will allow you to parse each line and
 cell in the file and then go from there.

 Take Care,

 --
 Leonard Burton, N9URK
 [EMAIL PROTECTED]

 The prolonged evacuation would have dramatically affected the
 survivability of the occupants.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Peristent Listen over an HTTP connection

2007-02-04 Thread Jiffy Slides Leonard Burton

XAJAX or another AJAX library, perhaps?

On 2/4/07, Stut [EMAIL PROTECTED] wrote:

chetan rane wrote:
 i want to write a script
 where , when ny client requests come i read the stream and then process it

 here is the exact steps

 when the user first initiates
 i create a session and establish a TCP connection
 second: when teh user next sends a request i dont create a new TCP
 connection but use the existing TCP connection.

Ok, couple of questions...

1) Why?
2) Why?

What is making these connections from the client side?

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
Leonard Burton, N9URK
http://www.jiffyslides.com
[EMAIL PROTECTED]
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php