now print_r the $html and you will find all the content on your page
To see a specific part
preg_match_all ( '/< li >.*?< h1 >< a href=" (. *? ) ">(. *? )< \/ a ><\/ h1 >.*?
$html,
$posts, // will contain the blog posts
PREG_SET_ORDER // formats data into an array of posts
);
for each $posts as $post)
$link = $post[1];
$title = $post[2];
$date = $post[3];
$content = $post[4];
// do something with data
}
No comments:
Post a Comment