select elements from a webpage

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
wvoyance
Forum Contributor
Posts: 135
Joined: Tue Apr 17, 2012 8:24 pm

select elements from a webpage

Post by wvoyance »

I use
$find = file_get_contents('http://find.nlbook/');
to get the content of a webpage.
Is there a method like jQuery selector that
I can select a specific part from the HTML?

I want a <div > with ID='profile'
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: select elements from a webpage

Post by requinix »

Not really. But the DOM extension gives you some of the same functionality that JavaScript can offer; getElementById and getElementsByTagName for instance.
User avatar
tr0gd0rr
Forum Contributor
Posts: 305
Joined: Thu May 11, 2006 8:58 pm
Location: Utah, USA

Re: select elements from a webpage

Post by tr0gd0rr »

I've been using QueryPath for over a year now and have found it to be very reliable. They advertise it as having an API very similar to jQuery. As a bonus, it can also update the HTML.
Post Reply