reading specific tag contents using php and curl

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
saravanand
Forum Newbie
Posts: 2
Joined: Wed Apr 21, 2010 6:55 am

reading specific tag contents using php and curl

Post by saravanand »

Hi,

I am using curl to get the page contents from a site. Then i get the entire content for the selected url and even checked that one by displaying it in a textarea. Now what i need is to select a specific tag and then there are child elements inside this tag. I want to select the parent tag and specific tags. I am new to using the regular expressions.

can any one please help me out of this problem.

advance thanks

regards,

d.saravanan
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: reading specific tag contents using php and curl

Post by requinix »

What's the HTML you're looking for, and is it unique on the page?
saravanand
Forum Newbie
Posts: 2
Joined: Wed Apr 21, 2010 6:55 am

Re: reading specific tag contents using php and curl

Post by saravanand »

Hi,

I solved this problem. however, need further details.

i am getting the search result in a complete html file from DOCTYPE XHTML tag till end of html tag. when i load this content in a html domdocument, it is reporting error and not able to load. also can you give me any regular expression to select the particular child of a parent tag.

regards

saravanan.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: reading specific tag contents using php and curl

Post by requinix »

Question still stands:
tasairis wrote:What's the HTML you're looking for, and is it unique on the page?
Also, what errors?
Post Reply