>
> <p class="question">
>  Who is Roger Rabbit?
> </p>
>
> My question is -- how can I extract the string "Who is Roger Rabbit?" from
> each page using php? You see, I want to store the questions in a database
> without having to re-type, or cut/paste, each one.
>


I have not found/created a working example of this using PHP. I tried using
> PHP's getElementByID(), but that requires the target file to be valid xml
> and the string to be contained within an ID and not a class. These pages do
> not support either requirement.
>
> Additionally, I realize that I can load the files and parse out what is
> between the <p> tags, but I was hoping for a "GetElementByClass" way to do
> this.
>
> So, is there one?
>


Perhaps I'd try this:
http://simplehtmldom.sourceforge.net/manual.htm

<http://simplehtmldom.sourceforge.net/manual.htm>Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

Reply via email to