Page 1 of 1

Read specifice tag data from php file

Posted: Fri Jan 31, 2014 1:52 pm
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.

Re: Read specifice tag data from php file

Posted: Fri Jan 31, 2014 2:03 pm
by Celauran
Have you looked at DOMDocument? What is it you're trying to do?

Re: Read specifice tag data from php file

Posted: Fri Jan 31, 2014 2:15 pm
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 :(