From 009141455ca15e2bed075a0ca13ec671ef8aec53 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Sun, 7 Dec 2025 22:39:06 +0100 Subject: [PATCH] =?UTF-8?q?Zaktualizowano=20dane=20po=C5=82=C4=85czenia=20?= =?UTF-8?q?FTP=20oraz=20dodano=20nowe=20klasy=20w=20autoload,=20a=20tak?= =?UTF-8?q?=C5=BCe=20zmodyfikowano=20logik=C4=99=20w=20klasie=20Cron=20dla?= =?UTF-8?q?=20dynamicznego=20ustawiania=20g=C5=82=C4=99boko=C5=9Bci=20zapy?= =?UTF-8?q?ta=C5=84.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/ftp-kr.sync.cache.json | 130 +++++++++++++++++++++++++++++++-- autoload/class.Cron.php | 19 ++++- 2 files changed, 140 insertions(+), 9 deletions(-) diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json index 4afaa12..cf04b3f 100644 --- a/.vscode/ftp-kr.sync.cache.json +++ b/.vscode/ftp-kr.sync.cache.json @@ -1,5 +1,5 @@ { - "ftp://dapro25624.serwervps.pl@www@rank24.pl": { + "ftp://host700513.hostido.net.pl@www@rank24.pl": { "public_html": { "ajax-check.php": { "type": "-", @@ -19,11 +19,130 @@ "lmtime": 0, "modified": false }, - "autoload": {}, + "autoload": { + "class.Cron.php": { + "type": "-", + "size": 17039, + "lmtime": 1765140268635, + "modified": false + }, + "class.DataBase.php": { + "type": "-", + "size": 6873, + "lmtime": 0, + "modified": false + }, + "class.DataBrowse.php": { + "type": "-", + "size": 16829, + "lmtime": 0, + "modified": false + }, + "class.DataEdit.php": { + "type": "-", + "size": 10221, + "lmtime": 0, + "modified": false + }, + "class.FileCache.php": { + "type": "-", + "size": 1259, + "lmtime": 0, + "modified": false + }, + "class.GoogleRank.php": { + "type": "-", + "size": 12236, + "lmtime": 0, + "modified": false + }, + "class.GoogleScraper.php": { + "type": "-", + "size": 4288, + "lmtime": 0, + "modified": false + }, + "class.GoogleSite.php": { + "type": "-", + "size": 10223, + "lmtime": 0, + "modified": false + }, + "class.Html.php": { + "type": "-", + "size": 2096, + "lmtime": 0, + "modified": false + }, + "class.Paging.php": { + "type": "-", + "size": 844, + "lmtime": 0, + "modified": false + }, + "class.SEOMixer.php": { + "type": "-", + "size": 1117, + "lmtime": 0, + "modified": false + }, + "class.S.php": { + "type": "-", + "size": 20136, + "lmtime": 0, + "modified": false + }, + "class.Tpl.php": { + "type": "-", + "size": 1701, + "lmtime": 0, + "modified": false + }, + "controls": {}, + "factory": {}, + "opd.class.php": { + "type": "-", + "size": 12928, + "lmtime": 0, + "modified": false + }, + "opd.debug.php": { + "type": "-", + "size": 5392, + "lmtime": 0, + "modified": false + }, + "opd.statement.php": { + "type": "-", + "size": 15898, + "lmtime": 0, + "modified": false + }, + "RestClient3.php": { + "type": "-", + "size": 8798, + "lmtime": 0, + "modified": false + }, + "RestClient.php": { + "type": "-", + "size": 7406, + "lmtime": 0, + "modified": false + }, + "savant3": {}, + "Savant3.php": { + "type": "-", + "size": 29087, + "lmtime": 0, + "modified": false + }, + "view": {} + }, "config.php": { "type": "-", - "size": 1689, - "lmtime": 1734013415427, + "size": 1699, + "lmtime": 0, "modified": false }, "cron.php": { @@ -61,7 +180,7 @@ ".htaccess": { "type": "-", "size": 421, - "lmtime": 1734037349168, + "lmtime": 0, "modified": false }, "index.php": { @@ -91,6 +210,7 @@ "modified": false }, "resources": {}, + "temp": {}, "templates": {}, "updates": {} } diff --git a/autoload/class.Cron.php b/autoload/class.Cron.php index 84b7e32..336c6ba 100644 --- a/autoload/class.Cron.php +++ b/autoload/class.Cron.php @@ -261,26 +261,37 @@ class Cron { $client = new RestClient( 'https://api.dataforseo.com/', null, 'pyziak84@gmail.com', '0p4rYWDNoK63eUUw' ); + $last_position = $mdb -> get( 'pro_rr_phrases_positions', 'position', [ 'AND' => [ 'phrase_id' => $row['id'] ], 'ORDER' => [ 'date' => 'DESC' ] ] ); + if ( $last_position <= 10 ) { + $depth = 30; + } elseif ( $last_position <= 30 ) { + $depth = 50; + } else { + $depth = 100; + } + if ( $row['localization'] and (int)$row['localization'] ) { $post_array[0] = array( - "language_name" => "Polish", + "language_code" => "pl", "location_code" => $row['localization'], "keyword" => mb_convert_encoding( $row['phrase'], "UTF-8" ), "priority" => 1, 'postback_data' => 'advanced', - 'postback_url' => 'http://www.rank24.pl/dsf.php?d4s-id=$id' + 'postback_url' => 'http://www.rank24.pl/dsf.php?d4s-id=$id', + 'depth' => $depth ); } else { $post_array[0] = array( - "language_name" => "Polish", + "language_code" => "pl", "location_code" => $row['localization'], "keyword" => mb_convert_encoding( $row['phrase'], "UTF-8" ), "priority" => 1, 'postback_data' => 'advanced', - 'postback_url' => 'http://www.rank24.pl/dsf.php?d4s-id=$id' + 'postback_url' => 'http://www.rank24.pl/dsf.php?d4s-id=$id', + 'depth' => $depth ); }