Extracting data from a table of another site

Hi, I’m quite new to PHP, and I’m keen to pick up this trade. I need help on extracting of data from another website, commonly known as screen scrapping. I was able to do it with a basic created function, but it doesn’t work for extracting data out from a table of another website.

I want to extract the data from each row and data of this site http://online.wsj.com/mdc/public/page/2_3021-usetf.html, so that I can put these data into my database.

My current code is

<?php $data = file_get_contents('http://online.wsj.com/mdc/public/page/2_3021-usetf.html'); $regex = '/You(.+?) registered/'; preg_match($regex,$data,$match); var_dump($match); echo $match[1]; ?>
Sponsor our Newsletter | Privacy Policy | Terms of Service