public function actionIndex() { $catalog = new CatalogWheters(); $catalog->deleteAll(); // Ташкент $url = "http://pogoda.yandex.ru/tashkent/"; $countNewNews = $this->getCategoryNews($url, 1); // Самарканд $url = "https://pogoda.yandex.ru/samarkand"; // Бухара $countNewNews = $this->getCategoryNews($url, 3); $url = "https://pogoda.yandex.ru/bukhara"; $countNewNews = $this->getCategoryNews($url, 2); // Термез $url = "https://pogoda.yandex.ru/termez"; $countNewNews = $this->getCategoryNews($url, 4); // Фергана $url = "https://pogoda.yandex.ru/phergana"; $countNewNews = $this->getCategoryNews($url, 6); // Хива $url = "https://pogoda.yandex.ru/khiva"; $countNewNews = $this->getCategoryNews($url, 7); // Шахрисабзе $url = "https://pogoda.yandex.ru/shahrisabz"; $countNewNews = $this->getCategoryNews($url, 8); }
public function run($args) { /* error_reporting( E_ALL ); ini_set('display_errors', 1); echo "Начал делать";*/ $catalog = new CatalogWheters(); $catalog->deleteAll(); // Ташкент $url = "http://pogoda.yandex.ru/tashkent/"; $countNewNews = $this->getCategoryNews($url, 1); // Самарканд $url = "https://pogoda.yandex.ru/samarkand"; // Бухара $countNewNews = $this->getCategoryNews($url, 3); $url = "https://pogoda.yandex.ru/bukhara"; $countNewNews = $this->getCategoryNews($url, 2); // Термез $url = "https://pogoda.yandex.ru/termez"; $countNewNews = $this->getCategoryNews($url, 4); // Фергана $url = "https://pogoda.yandex.ru/phergana"; $countNewNews = $this->getCategoryNews($url, 6); // Хива $url = "https://pogoda.yandex.ru/khiva"; $countNewNews = $this->getCategoryNews($url, 7); // Шахрисабзе $url = "https://pogoda.yandex.ru/shahrisabz"; $countNewNews = $this->getCategoryNews($url, 8); }