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

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 ht

RE: [PHP] html parsing

2007-11-08 Thread Ford, Mike
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

Re: [PHP] html parsing

2007-11-08 Thread Jim Lucas
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

Re: [PHP] html parsing

2007-11-08 Thread Per Jessen
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 eit

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
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 convi

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 l

Re: [PHP] html parsing

2007-11-07 Thread Casey
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

Re: [PHP] html parsing

2007-11-07 Thread Tom Ray [Lists]
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 h

[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:

Re: [PHP] html parsing question

2003-03-02 Thread Marek Kilimajer
You can output xhtml with your custom tags and use xml parsing functions Jos Elkink wrote: Hello, I've got a little question. I am writing a page where I would like to parse my own invented HTML-looking tags (but want to keep the real HTML tags intact). I use a buffer for the output, and just be

RE: [PHP] html parsing question

2003-03-02 Thread John W. Holmes
> I've got a little question. I am writing a page where I would like to > parse my own invented HTML-looking tags (but want to keep the real HTML > tags intact). I use a buffer for the output, and just before the end use > ob_get_contents() to get the whole buffer which I want to check for > those

[PHP] html parsing question

2003-03-02 Thread Jos Elkink
Hello, I've got a little question. I am writing a page where I would like to parse my own invented HTML-looking tags (but want to keep the real HTML tags intact). I use a buffer for the output, and just before the end use ob_get_contents() to get the whole buffer which I want to check for those ta

[PHP] html parsing from html file through php

2002-08-14 Thread victor
Hello, I am making an app that read from an html file outputted by MS word (ya its for those people that need to make webpages but don't know how o write html) anyway, using MS word is a requirement; After the user saves their .doc file as a web page (now and htm file) the php will take that html

RE: [PHP] html parsing question

2001-08-03 Thread Dave
below is a snippet from a larger code used to capture a daily output graphic file from a site... I put your requirements into it and removed a lot of superfluous stuff, but it is not set to capture text spanning more than one line, but you should be able to modify it accordingly if you can follow

[PHP] html parsing question

2001-08-03 Thread Chuck Barnett
Hi I have a question about parsing a page on another server to grab some headlines. I want to search down the page until I find a string "-headlines-" then I want to grab everything between the next pair of tags. Anyone have a quick solution? Thanks, Chuck -- PHP General Mailing List (http

Re: [PHP] html parsing question

2001-08-02 Thread mike cullerton
on 8/2/01 5:30 PM, Chuck Barnett at [EMAIL PROTECTED] wrote: > Hi I have a question about parsing a page on another server to grab some > headlines. > > I want to search down the page until I find a string "-headlines-" then I > want to grab everything between the next pair of tags. > > Anyone