Hey,
I have this terrible feeling i'm missing something really simple here.
I'm trying to get my head around file_get_contents, combined with regex, to get specific bits of data from web pages.
Lets say I want the about my part on my plurk page: http://www.plurk.com/user/Toddish
the source code is:
so, I tried this:
but I get nothing.
any idea what I'm missing?
cheers, rep etc as usual
I have this terrible feeling i'm missing something really simple here.
I'm trying to get my head around file_get_contents, combined with regex, to get specific bits of data from web pages.
Lets say I want the about my part on my plurk page: http://www.plurk.com/user/Toddish
the source code is:
Code:
<p id="about_me">
I'm a web designer from the UK who loves games, music, and films :)
<br>If you like any of my Plurks, feel free to add me!
</p>
so, I tried this:
PHP:
<?php
$data = file_get_contents('http://www.plurk.com/user/Toddish');
$regex = '/<p id="about_me">[.*]<\/p>/';
preg_match($regex,$data,$match);
var_dump($match);
?>
but I get nothing.
any idea what I'm missing?
cheers, rep etc as usual






