php-general Digest 12 Oct 2007 17:10:14 -0000 Issue 5069

2007-10-12 Thread php-general-digest-help
php-general Digest 12 Oct 2007 17:10:14 - Issue 5069 Topics (messages 263131 through 263156): Re: preg_match_all Help 263131 by: Jim Lucas 263135 by: admin.buskirkgraphics.com 263140 by: Richard Heyes 263141 by: Al Compose MP3 from a php enabled flash page.

Re: [PHP] Classes - Dumb question

2007-10-12 Thread Nathan Nobbe
On 10/12/07, Larry Garfield [EMAIL PROTECTED] wrote: On Thursday 11 October 2007, Jay Blanchard wrote: [snip] okay, this is really (!) embarassing, but I have to ask: Why would I want to use classes in PHP? I have been using PHP for years now and writing the normal functions all

RE: [PHP] preg_match_all Help

2007-10-12 Thread admin
Okay use this as an example I want put parse the html document and toss everything between the two Div class channels into an array. The problem I am having is that I cannot grab everything in between the Pattern of the preg_match_all. If I preg_match_all('/div class=channel

Re: [PHP] Re: Generating PDF files (XSLT, ps, XSL-FO, FOP, etc)

2007-10-12 Thread Per Jessen
Colin Guthrie wrote: If found a really good quote the other day about XSL but I now can't find the link and it's gone from my history but it was something like: You could write a insert obscure lanaguage here parser/lexer in XSLT but I'm not going to. It's a very powerful language but the

Re: [PHP] Need help adding dBase support to PHP

2007-10-12 Thread Jon Westcot
Hi Nathan: The page you referenced in the PHP documentation is exactly what I saw that indicated that the dBase functions needed to be compiled in with the --enable-dbase directive. What I need to know is HOW to do this, even in general terms. GoDaddy is being very little help (no big

Re: [PHP] Need help adding dBase support to PHP

2007-10-12 Thread Nathan Nobbe
On 10/12/07, Jon Westcot [EMAIL PROTECTED] wrote: Hi Nathan: The page you referenced in the PHP documentation is exactly what I saw that indicated that the dBase functions needed to be compiled in with the --enable-dbase directive. What I need to know is HOW to do this, even in general

Re: [PHP] Need help adding dBase support to PHP

2007-10-12 Thread Jon Westcot
Hi Nathan: Thanks for the info. Unfortunately, it's not my call which host to use. I'm just being asked to help write some code, and I know that there are DBFs in the process that need to be examined and brought into MySQL on a daily basis, if not more often. From what I've been told,

Re: [PHP] preg_match_all Help

2007-10-12 Thread Al
Assuming you know all the permissible div tag classes you want to capture the contents of I'd make an array list of them and the use a foreach() loop and capture the contents you want and not try to capture the contents between the channel divs. Assemble the output array inside the loop.

Re: [PHP] Re: Something you can do with AJAX + PHP as well

2007-10-12 Thread tedd
At 5:02 PM +0200 10/11/07, Per Jessen wrote: tedd wrote: For example: If you have a process that is taking time server-side and want to let the user know in real time what the progress is, this is one way to do it. That's not something (by definition) you can do with javascript alone,

Re: [PHP] Compose MP3 from a php enabled flash page.

2007-10-12 Thread Tom Ray [Lists]
John Taylor-Johnston wrote: I have an educational web site. I want to create an interface where my students can record their voices client side and then save messages server side. I thought Odeo would solve my problems. (The have their own problems now.) Then I tried: MyChingo and Mobasoft.

RE: RE: [PHP] round()

2007-10-12 Thread Jürgen Wind
tedd wrote: At 7:30 PM -0700 10/11/07, Instruct ICC wrote: Now I see why BCMath was mentioned. Yes, but precision is not the issue. It doesn't make any difference if you are rounding. (a) 1.489123451985765 or (b) 148912345198576.5 You still have to make a decision as to

[PHP] Re: Screenshot from web page

2007-10-12 Thread Al
Check the Imagick php-extension API for the Imagemagick commands. I recall there is a an html= jpg or any image format. Gevorg Harutyunyan wrote: Hi, I would like to make web page screenshot and generate an image for example .jpg or .png using PHP,Apache. If any one has experiance in doing

[PHP] Screenshot from web page

2007-10-12 Thread Gevorg Harutyunyan
Hi, I would like to make web page screenshot and generate an image for example .jpg or .png using PHP,Apache. If any one has experiance in doing that please help. I know that there are lot of services like that, but I don't want to use them. In real I need that to generate screenshot of my

Re: [PHP] How to decode the PHP Source Code

2007-10-12 Thread Daniel Brown
On 10/12/07, David Giragosian [EMAIL PROTECTED] wrote: On 10/12/07, tedd [EMAIL PROTECTED] wrote: At 9:57 AM -0400 10/11/07, Daniel Brown wrote: By the way, Tedd you alright there? Ya' kinda' got squashed. -- Daniel P. Brown I'm find, but I lost my thought -- it's

RE: [PHP] RE: round()

2007-10-12 Thread tedd
At 7:30 PM -0700 10/11/07, Instruct ICC wrote: Now I see why BCMath was mentioned. Yes, but precision is not the issue. It doesn't make any difference if you are rounding. (a) 1.489123451985765 or (b) 148912345198576.5 You still have to make a decision as to if the above (a) rounds to:

Re: [PHP] round()

2007-10-12 Thread tedd
At 10:22 AM -0400 10/11/07, Nathan Nobbe wrote: On 10/11/07, tedd mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: At 4:18 PM -0600 10/10/07, mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: I disagree. I will need to see an example where the round() is inaccurate. You may disagree if you

Re: [PHP] Classes - Dumb question

2007-10-12 Thread Stut
tedd wrote: function customer($whatWas, $customertype, $whatAdditional) { /* do what was (i.e., common to all) */ /* then do what's additional unique to type */ switch(1) { case $customertype =='Commercial': commercialCustomer($whatAdditional); break; ..

Re: [PHP] Classes - Dumb question

2007-10-12 Thread Nathan Nobbe
On 10/12/07, Jay Blanchard [EMAIL PROTECTED] wrote: No doubt. (are you by chance continuing the other argument, re: interfaces?), but you have to break open the original tested function, add code to it, test it, etc. Every time you add a new case you have to break open the existing function

Re: [PHP] How to decode the PHP Source Code

2007-10-12 Thread David Giragosian
On 10/12/07, tedd [EMAIL PROTECTED] wrote: At 9:57 AM -0400 10/11/07, Daniel Brown wrote: By the way, Tedd you alright there? Ya' kinda' got squashed. -- Daniel P. Brown I'm find, but I lost my thought -- it's happening more these days. :-) Cheers, tedd -- ---

Re: [PHP] How to decode the PHP Source Code

2007-10-12 Thread tedd
At 9:57 AM -0400 10/11/07, Daniel Brown wrote: By the way, Tedd you alright there? Ya' kinda' got squashed. -- Daniel P. Brown I'm find, but I lost my thought -- it's happening more these days. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com

Re: [PHP] preg_match_all Help

2007-10-12 Thread Richard Heyes
[EMAIL PROTECTED] wrote: ... It would help to see the input text and to know exactly what you're trying to match. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing

Re: [PHP] RE: round()

2007-10-12 Thread Nathan Nobbe
On 10/12/07, tedd [EMAIL PROTECTED] wrote: At 7:30 PM -0700 10/11/07, Instruct ICC wrote: Now I see why BCMath was mentioned. Yes, but precision is not the issue. It doesn't make any difference if you are rounding. (a) 1.489123451985765 or (b) 148912345198576.5 You still have to

RE: [PHP] Classes - Dumb question

2007-10-12 Thread Jay Blanchard
[snip] First of all what you call normal is procedural or functional programming. There is nothing wrong with doing things this way and may be especially quick and efficient when doing basic web sites and applications. Document well and you will have no problem maintaining your code. One

Re: [PHP] Filter input

2007-10-12 Thread tedd
At 5:17 PM +0200 10/11/07, Manuel Vacelet wrote: The thing that remains not very clear to me is where validation stop and where application logic start. Forgive me if I'm stating the obvious. For me, there isn't a variable that I receive in any of my scripts that I don't know what it should

Re: [PHP] exit and ob_*

2007-10-12 Thread Philip Thompson
On 10/12/07, Robert Cummings [EMAIL PROTECTED] wrote: Have you checked your error log to see if there an error being generated that you can't see? Cheers, Rob. Yes, no unusual errors. The thing is... this wasn't an issue when I was developing on a Suse box running apache. Recently, I moved

Re: [PHP] exit and ob_*

2007-10-12 Thread Andrew Ballard
On 10/12/07, Philip Thompson [EMAIL PROTECTED] wrote: I suppose this isn't a big deal during production, but during testing it's really frustrating. Does anyone have any suggestions as to why 'exit' is functioning (no pun intended) this way? Note: I do want what's currently in the buffer to be

RE: [PHP] Classes - Dumb question

2007-10-12 Thread Jay Blanchard
[snip] Yes, but I could do that procedurally from within the customer function by simply adding a customer type (needed regardless) and using a switch to direct and collect the additional data needed. In either case, I still have to write more code to accommodate scaling. And, if I have

RE: [PHP] Classes - Dumb question

2007-10-12 Thread tedd
At 7:36 AM -0500 10/11/07, Jay Blanchard wrote: [snip] okay, this is really (!) embarassing, but I have to ask: Why would I want to use classes in PHP? I have been using PHP for years now and writing the normal functions all the time. I have never even bothered working with classes, but now I

Re: [PHP] exit and ob_*

2007-10-12 Thread Robert Cummings
On Fri, 2007-10-12 at 14:30 -0500, Philip Thompson wrote: On 10/12/07, Robert Cummings [EMAIL PROTECTED] wrote: Have you checked your error log to see if there an error being generated that you can't see? Cheers, Rob. Yes, no unusual errors. The thing is... this wasn't an issue

[PHP] RE: round()

2007-10-12 Thread tedd
At 11:26 AM -0700 10/11/07, =?UTF-8?Q?J=C3=BCrgen_Wind?= wrote: I get correct results: 5.2.4 PHP_VERSION round(5.555,2):5.56 toFixed(5.555,2):5.56 You get correct results because the demand you made of the function was simple. If you expand your demand to thousands of cases, then the bias

Re: [PHP] exit and ob_*

2007-10-12 Thread Philip Thompson
On 10/12/07, Robert Cummings [EMAIL PROTECTED] wrote: On Fri, 2007-10-12 at 14:30 -0500, Philip Thompson wrote: On 10/12/07, Robert Cummings [EMAIL PROTECTED] wrote: Have you checked your error log to see if there an error being generated that you can't see? Cheers, Rob.

Re: [PHP] exit and ob_*

2007-10-12 Thread Robert Cummings
Have you checked your error log to see if there an error being generated that you can't see? Cheers, Rob. On Fri, 2007-10-12 at 14:03 -0500, Philip Thompson wrote: Hi. This is weird. Here's my structure. I have an index.php file that just includes the content depending on what page the user

RE: [PHP] round()

2007-10-12 Thread Instruct ICC
Yes, but precision is not the issue. It doesn't make any difference if you are rounding. You still have to make a decision Uuhm, what was $t on the platform before the round please (the += .000..1 post)? Then that will confirm that precision is not the problem. Also,

[PHP] exit and ob_*

2007-10-12 Thread Philip Thompson
Hi. This is weird. Here's my structure. I have an index.php file that just includes the content depending on what page the user is on. So, because of potential redirection from those sub-pages, I call ob_start() before any output (in index.php). I'm doing some testing and I'm wanting to see what

Re: [PHP] exit and ob_*

2007-10-12 Thread Philip Thompson
On 10/12/07, Andrew Ballard [EMAIL PROTECTED] wrote: On 10/12/07, Philip Thompson [EMAIL PROTECTED] wrote: I suppose this isn't a big deal during production, but during testing it's really frustrating. Does anyone have any suggestions as to why 'exit' is functioning (no pun intended) this

RE: [PHP] round()

2007-10-12 Thread Instruct ICC
Yes, but precision is not the issue. php -r '$t=123.45; echo $t . \n; $t+=0.001; echo $t . \n;' 123.45 123.451 php -r '$t=123.45; echo $t . \n; $t+=0.0001; echo $t . \n;' 123.45 123.45 php -r '$t=123.45678901234567; echo $t . \n;' 123.45678901235 Geee garbage in,

[PHP] header error without whitespace issue

2007-10-12 Thread Brad
Error = WARNING: Cannot modify header information - headers already sent by (output started at /home/zoneof5/public_html/index-dev.html:10) in line 1528 of file common.inc.php Which comes from me trying to take a login script and put it into an existing .html file with .htaccess configured to

Re: [PHP] A two flavored post

2007-10-12 Thread Dan
In addition to what everyone else has suggested you probably also want to have your page work for people without javascript enabled, or the handicapped. One way you could do this is have a div and the PHP generates the div where you would put the link, with code for the link inside with the

RE: RE: [PHP] round()

2007-10-12 Thread tedd
At 11:08 AM -0700 10/12/07, =?UTF-8?Q?J=C3=BCrgen_Wind?= wrote: It's a question of what you expect from a rounding function. If you work with reals on a computer you always have a bit of fuzzynes due to the internal conversions from float to binary and resulting truncations. It is only reals

RE: [PHP] round()

2007-10-12 Thread tedd
At 12:55 PM -0700 10/12/07, Instruct ICC wrote: Yes, but precision is not the issue. php -r '$t=123.45; echo $t . \n; $t+=0.001; echo $t . \n;' 123.45 123.451 php -r '$t=123.45; echo $t . \n; $t+=0.0001; echo $t . \n;' 123.45 123.45 php -r

Re: [PHP] Classes - Dumb question

2007-10-12 Thread tedd
At 2:44 PM +0100 10/12/07, Stut wrote: You can limit the need to add more code like so... function customer($whatWas, $customertype, $whatAdditional) { /* do what was (i.e., common to all) */ /* then do what's additional unique to type */ $func =

RE: [PHP] Classes - Dumb question

2007-10-12 Thread tedd
At 9:03 AM -0500 10/12/07, Jay Blanchard wrote: tedd said: In either case, I still have to write more code to accommodate scaling. And, if I have more customer types, then it's a simple matter to add more customer functions and addition case statements to the initial customer function. I don't