从PHP URL读取表中的数据并将其写入文本文件

We have a local site written in PHP, which contains some data in table format (index.php). It is a dynamically generated data/table, so I'm not able to access the database behind it.

Is there any way I can read the table in that web page, and write it to a text file in the same table format using perl/php/python?

The table is a huge one with around 1000 rows. But I need only the top 10 rows (sorted based on one of the columns).

Please help.

In PHP you can use file_get_contents() function to get the whole html of any page, than you can filter your required content and save it in a text file using fopen() and fwrite().