[PHP] php bar/graph scripts/library

2007-03-15 Thread Ron Croonenberg
hello all,

I am looking for some  scripts/libraries etc to produce some bar graphs etc.

Does anyone know of something "nice (that works on Linux)

thanks,
Ron

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



[PHP] html parsing

2007-11-07 Thread Ron Croonenberg

Hello,

I have a script that ads data to a html template.
However when there is an include in the html like:



it is not "processed", but "just" ends up as a string in the page.

So I guess it needs to be parsed. Is there an easy way to do that ?

thanks,

Ron

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



Re: [PHP] html parsing

2007-11-07 Thread Ron Croonenberg
ok I wrote something "quick and dirty" real quick:

But somehow it doesn't seem to like recursion. Is there something
"special" one needs to do in php ?

here's the code snippet:

function parsehtmlline($line)
{
if (strlen(strstr($line, "#include")) == 0 &&
strlen(strstr($line, "

Re: [PHP] html parsing

2007-11-07 Thread Ron Croonenberg
Yes I do have SSI enabled

here is what I am doing.

I have a php script that reads (a basic) file with html in it. (meaning
it it would have an html/shtml extension it would just work in a browser.

Now I rename the file to myhtml.dat and let the script read it and print
it to stdout.
That works like a char.  until there's a server side include in the
html page. (ssi's work in both html and in php)

I tried to usebut that doesn't seem to
work



Tom Ray [Lists] wrote:
> Ron Croonenberg wrote:
>> Hello,
>>
>> I have a script that ads data to a html template.
>> However when there is an include in the html like:
>>
>> 
>>
>> it is not "processed", but "just" ends up as a string in the page.
>>
>> So I guess it needs to be parsed. Is there an easy way to do that ?
>>
>> thanks,
>>
>> Ron
>>
>>   
> Do you have SSI enable in Apache? You are running Apache right? Do you
> have the file named .shtml? Or do you have Apache setup to run SSI
> through the HTML parser allowing you to have the files named .html
> instead. But I guess the other question is why are you using an SSI
> command that you could easily use a PHP command for and thus not have to
> mix the two?
> 

-- 
=
 Ron Croonenberg   |
   | Phone: 1 765 658 4761
 Lab Instructor &  | Fax:   1 765 658 4732
 Technology Coordinator|
   |
 Department of Computer Science| e-mail: [EMAIL PROTECTED]
 DePauw University |
 275 Julian Science & Math Center  |
 602 South College Ave.|
 Greencastle, IN  46135|
=

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



Re: [PHP] html parsing

2007-11-07 Thread Ron Croonenberg
I think the problem is that I read the lines in PHP, I read them with
fgets and output them with printf.

So the php "interpreter" never gets to see the line.

the apache doesn't parse php output, so it doesn't happen there either.

So..  I figured..  I either had to parse it in php myself OR convince
the apache server to parse it for me.

Ron

Casey wrote:
> Can you just change it to
> 
> 
> 
> ?
> 
> 
> On Nov 7, 2007, at 7:24 PM, Ron Croonenberg <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hello,
>>
>> I have a script that ads data to a html template.
>> However when there is an include in the html like:
>>
>> 
>>
>> it is not "processed", but "just" ends up as a string in the page.
>>
>> So I guess it needs to be parsed. Is there an easy way to do that ?
>>
>> thanks,
>>
>> Ron
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
> 

-- 
=
 Ron Croonenberg   |
   | Phone: 1 765 658 4761
 Lab Instructor &  | Fax:   1 765 658 4732
 Technology Coordinator|
   |
 Department of Computer Science| e-mail: [EMAIL PROTECTED]
 DePauw University |
 275 Julian Science & Math Center  |
 602 South College Ave.|
 Greencastle, IN  46135|
=

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



Re: [PHP] html parsing

2007-11-08 Thread Ron Croonenberg

Hi Mike,

(I know it can probably be done better, or more elegant).

The problem is that the recursion doesn't seem to stop. (Unless there 
are html ssi's that "loop") there shouldn't be a problem. It basically 
just freezes up (probably the recursion not terminating/ falling back.)
However the html just displays fine when I don't use recursion, so t 
somewhat baffled me that when I use recursion the script doesn't 
terminate. I did get to see some error msgs about problems with file 
streams. Maybe it is running out of file handles ?


thanks,

Ron


Ford, Mike wrote:

On 08 November 2007 06:41, Ron Croonenberg wrote:


ok I wrote something "quick and dirty" real quick:

But somehow it doesn't seem to like recursion. Is there something
"special" one needs to do in php ?


Recursive functions work just fine in PHP. What's the error message?

As far as I can see, there's nothing wrong with what you've posted, except for 
where there's some inefficiency due to not having found the right functions to 
use (see corrections below).


here's the code snippet:

function parsehtmlline($line)
{
if (strlen(strstr($line, "#include")) == 0 &&
strlen(strstr($line, "

Re: [PHP] html parsing

2007-11-08 Thread Ron Croonenberg


Hi Per,

the "pages" are templates. depending on some variables either one page 
shows up, or another without links in the address bar changing etc.


Ron


Per Jessen wrote:

Ron Croonenberg wrote:


I think the problem is that I read the lines in PHP, I read them with
fgets and output them with printf.

So the php "interpreter" never gets to see the line.

the apache doesn't parse php output, so it doesn't happen there
either.

So..  I figured..  I either had to parse it in php myself OR convince
the apache server to parse it for me.


Absolutely.  Why are you parsing it yourself anyway - what value are you
adding? 



/Per Jessen, Zürich



--

=========
 Ron Croonenberg   |
   | Phone: 1 765 658 4761
 Lab Instructor &  | Fax:   1 765 658 4732
 Technology Coordinator|
   |
 Department of Computer Science| e-mail: [EMAIL PROTECTED]
 DePauw University |
 275 Julian Science & Math Center  |
 602 South College Ave.|
 Greencastle, IN  46135|
=

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