Good day! It is necessary that the PHP script went to the page http://site1.ru/ , parsil information from tags

 <td>10000 $</td> </tr> <tr> <td align="center">2</td> 
  • $ 10,000 - infa, which must be parsed. And then, I went to http://site2.ru/ , also parsed the information and sorted in descending order.
  • Well, where is your code, where are your attempts at thinking, etc.? <br> We are not on the freelance website ... - Zowie
  • I ask only to give material on this topic. I think that I have to dig in the direction of file_get_contents, but so far I have been looking for it without success ... - nick777
  • Well, what kind of problems are there? <br> You have 2 tasks described in the question at once, you first parse and then think about sorting, for parsing in your case most likely file_get_contents fits well ... - Zowie

1 answer 1

Materials on this topic:

curl / fsockopen (for fsockopen )

preg_match_all and мануал по регуляркам (for parsing)

инфа по сортировке массивов

mysql_* (to save)

This is the most common connective, and the algorithm is almost of these functions with parameters and is going in the right order. Got the text - pulled the appropriate values ​​- sorted - recorded in the database.

  • How to determine the largest number? - nick777
  • Like this: $ arr = array (1, 4, 2, 15, 10003, 12); $ maxn = max ($ arr); echo $ maxn; // 10003 - Sh4dow 4:21 pm