473,379 Members | 1,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

PHP ques: Webpage retrieval and parsing

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
1 3968
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: news | last post by:
Hi, I am pretty new to PHP I want to do the following but I have been unable to find good info/ or sample code on it; please help; - retrieve a gif/jpeg image using PHP from another site -...
4
by: John | last post by:
Hi everyone ! I am a newbie to this newsgroup. I would appreciate if someone can help me to solve this problem. OK, I am currently writing a webpage in PHP that will get RSS file(XML file)...
1
by: Lyle H. Gray | last post by:
We load a table from a text file using Data Transformation Services. The source file is already sorted by primary key order. After the DTS load, the default retrieval order on the target table...
4
by: news.microsoft.com | last post by:
Hi again, I am pretty new to ASP.net (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...
6
by: GrispernMix | last post by:
//ques and and level order traversal file name: lab6_build_leaf_up.cpp Instructions:
12
by: grace | last post by:
i am wondering why my database retrieval becomes too slow...we set up a new server (ubuntu, breezy badger) machine where we transferred all our files from the old server.. Our new server uses Asus...
0
by: JosAH | last post by:
Greetings, Introduction At the end of the last Compiler article part I stated that I wanted to write about text processing. I had no idea what exactly to talk about; until my wife commanded...
0
by: JosAH | last post by:
Greetings, welcome back; above we discussed the peripherals of the Library class: loading and saving such an instantiation of it, the BookMark interface and then some. This part of the article...
0
by: snsanju | last post by:
Hi, i am writing a program to fetch the portion of the data of a webpage. Here i am using www::mechanize module. I got succeeded to print the part of the web page section but here the problem...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.