Прежде чем парсить изображение мне нужно нажать на кнопку и его получить.
function appendMoonwalkDataIntoDB()
{
global $SQLInterface;
$currentDate = new DateTime();
$folderName = __DIR__."\\bd\\".$currentDate->format("Ymd");
$currentFolder = opendir($folderName);
while(false !== ($currentItem = readdir($currentFolder)))
{
if(!is_dir($folderName."\\".$currentItem))
{
$content = json_decode(file_get_contents($folderName."\\".$currentItem));
if(
(strpos($content->report->report_name, "serials_") !== false) &&
(strpos($content->report->report_name, "serials_") == 0)
)
{
$curentCategory = $content->report->report_name;
echo $curentCategory."\n";
echo $content->report->total_count."\n";
$moviesByGenreAmount = 0;
foreach($content->report->serials as $currentMovie)
{
$SQLQuery =
"INSERT INTO movies (".
"title_ru, title_en, kinopoisk_id, token, type, ".
"iframe_url, translator, translator_id, category, ".
"camrip, added_at, seasons_count, episodes_count) VALUES(".
"\"".htmlspecialchars(trim($currentMovie->title_ru))."\", ".
"\"".htmlspecialchars(trim($currentMovie->title_en))."\", ".
"\"".$currentMovie->kinopoisk_id."\", ".
"\"".$currentMovie->token."\", ".
"\"".$currentMovie->type."\", ".
"\"".$currentMovie->iframe_url."\", ".
"\"".$currentMovie->translator."\", ".
"\"".$currentMovie->translator_id."\", ".
"\"".$curentCategory."\", ".
"\"\", ".
"\"\", ".
"\"".$currentMovie->seasons_count."\", ".
"\"".$currentMovie->episodes_count."\"".
")";
$appendResult = $SQLInterface->oneStringInsertData($SQLQuery);
echo $currentMovie->title_en."\n";
$moviesByGenreAmount++;
}
echo "Serials in this file: ".$moviesByGenreAmount."\n";
echo "SERIALS\n***********************************\n";
}
elseif(
(strpos($content->report->report_name, "movies_") !== false) &&
(strpos($content->report->report_name, "movies_") == 0)
)
{
$curentCategory = $content->report->report_name;
echo $curentCategory."\n";
echo $content->report->total_count."\n";
$moviesByGenreAmount = 0;
foreach($content->report->movies as $currentMovie)
{
$SQLQuery =
"INSERT INTO movies (".
"title_ru, title_en, kinopoisk_id, token, type, ".
"iframe_url, translator, translator_id, category, ".
"camrip, added_at, seasons_count, episodes_count) VALUES(".
"\"".htmlspecialchars(trim($currentMovie->title_ru))."\", ".
"\"".htmlspecialchars(trim($currentMovie->title_en))."\", ".
"\"".$currentMovie->kinopoisk_id."\", ".
"\"".$currentMovie->token."\", ".
"\"".$currentMovie->type."\", ".
"\"".$currentMovie->iframe_url."\", ".
"\"".$currentMovie->translator."\", ".
"\"".$currentMovie->translator_id."\", ".
"\"".$curentCategory."\", ".
"\"".$currentMovie->camrip."\", ".
"\"".$currentMovie->added_at."\", ".
"\"\", ".
"\"\"".
")";
$appendResult = $SQLInterface->oneStringInsertData($SQLQuery);
echo $currentMovie->title_en."\n";
$moviesByGenreAmount++;
}
echo "Movies in this file: ".$moviesByGenreAmount."\n";
echo "MOVIES\n***********************************\n";
}
}
}
}
var COLS = 20,
ROWS = 20,
col = 1,
row = 21;
if ((col < 1) || (col > COLS) || (row < 1) || (row > ROWS))
{
console.log('gameover');
}
Наверное, не все нам говорят