PHP ques: Webpage retrieval and parsing

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi again, I am pretty new to PHP (I use to be a Visual Basic 6 addict)

I want to do the following but I have been unable to find good info/ or
sample code on it; please help;

- retrieve a webpage using PHP from another site (the url have parameters
like (?date=january) in it if that makes a difference)

- using PHP  code I want to Parse a table (perhaps using DomDocument
object?)  I want to retrieve data from the table cell first by row   and
then by column.
 (retrieve the data to be store in data object)

- Then I want to use the data object to display the information retrieve in

I am looking for sample codes, references or anything of that nature to help
Thank you in advance.  and please be as detail as you like.


Re: PHP ques: Webpage retrieval and parsing


welcome to PHP! --

First take a look a CURL -

That, used correctly will load the content of a url into a variable..
Then to parse outa table you will need to use some creative REGEX to
pull out the table/tr/td etc..

I have seen somewhwere, try searching google, someone wrote a class
similer to simpleXML that pulls an html table and loads it as a usuable


news wrote:
Quoted text here. Click to load it
Quoted text here. Click to load it
retrieve in
to help

Site Timeline