By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

PHP ques: Webpage retrieval and parsing

P: n/a
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
webpage?
I am looking for sample codes, references or anything of that nature to help
me.
Thank you in advance. and please be as detail as you like.

Joe.

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

welcome to PHP! --

First take a look a CURL -
http://www.php.net/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
object.

Phil
news wrote:
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 webpage?
I am looking for sample codes, references or anything of that nature to help me.
Thank you in advance. and please be as detail as you like.

Joe.


Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.