A
A
Alexey Karpan2016-09-09 06:47:05
PHP
Alexey Karpan, 2016-09-09 06:47:05

Bulletin board parsing. How to set up automatic sending of new ads by email?

I use simple_html_dom.php
The code is simple and normal, example:

include('simple_html_dom.php');	

        $html = file_get_html('site.ru') ;
    foreach($html->find('td[class=class1]') as $a) {
    	echo $a->innertext . '<br>';
    }
  $html->clear(); 
  unset($html);
   }

How to organize an automatic check by the parser (at a given time) for adding new ads and sending them to email?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-09-09
@dvguinf

Good morning.
You can run the script automatically using cron.
But it is not entirely clear by what parameter, how and what do you want to check?
If you are parsing ads, then save them in the database, during new parsing, check if there is such an ad in the database, if not, then write down and send an email.
You can add a new declaration using cUrl.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question