Read specifice tag data from php file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
adi145
Forum Newbie
Posts: 2
Joined: Fri Sep 23, 2011 12:58 pm

Read specifice tag data from php file

Post by adi145 »

Hey
I am using curl to get the data of site and save it into a php file. Now i have all the content of that site now i want to read specific data from it. For example this file have one table i want to get that table from whole file. I use different method of php like

Code: Select all

fopen, fgets, fread 
or many other, But the problem is that in these method i have to specify the exact index, so is there any way to get whole tag and its data by its name, It will be very help full for me thanks.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Read specifice tag data from php file

Post by Celauran »

Have you looked at DOMDocument? What is it you're trying to do?
adi145
Forum Newbie
Posts: 2
Joined: Fri Sep 23, 2011 12:58 pm

Re: Read specifice tag data from php file

Post by adi145 »

No i did not study it, actually i am new in php so that's why i am asking is there solution for this. Now i study it. Basically i am building a mobile site which show mobile specifications, now user want that it get all the specification from other site by just passing url, So i get the whole page data with curl but not able to get specific information from it. This is the whole story which make me mad :(
Post Reply