Parsing information and sorting it in descending order (numbers)

Good afternoon!
It is necessary that the PHP script go to the http://site1.ru/page, parse information from the

tags

<td>10000 $</td>
</tr>
<tr>
    <td align="center">2</td>
  • $10000 – info to be parsed.
    And then, I went to http://site2.ru/, also parsed the information and sorted it in descending order.

Answer 1, authority 100%

Materials on this topic:

curl/fsockopen(for info)

preg_match_alland (for parsing)

mysql_*(for saving)

This is the most common pairing, and the algorithm is assembled almost from these functions with parameters and in the correct order. We got the text – pulled out the appropriate values ​​- sorted it – wrote it to the database.