K
K
kupurim2019-01-09 18:04:14
PHP
kupurim, 2019-01-09 18:04:14

How to decode a string?

Hello.
I want to parse information from the site myscore.ru, namely to get the matches for tomorrow:

kartika
7c0899f1e8.jpg

CURL'om I get the following line:
SA÷1¬~ZA÷АВСТРАЛИЯ: Женская высшая лига¬ZEE÷tbR6H4dE¬ZB÷24¬ZY÷Австралия¬ZC÷KMpoB4mr¬ZD÷c¬ZE÷radPIsO6¬ZF÷0¬ZO÷0¬ZG÷1¬ZH÷24_tbR6H4dE¬ZJ÷2¬ZL÷/football/australia/w-league/¬ZX÷00А

But how to bring it back to normal, i.e. it seems to be Russian characters with English in the normal form, but somehow displays html tags in a strange way?
Does anyone know how to solve?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Chesnokov, 2019-01-09
@cesnokov

Judging from the code of the page, nothing needs to be decrypted. Creators pass a multidimensional array in this way. Here is the part of the code responsible for parsing the string:

var FeedParser = (function() {
    function FeedParser(Feed_Table_StatsParser) {
        this.DELIMITER_ROW = "~";
        this.DELIMITER_CELL = "¬";
        this.DELIMITER_VALUE = "÷";
        this.statsParser = Feed_Table_StatsParser
    }
    FeedParser.prototype.parse = function(feed) {
        var statsParser = this.statsParser;
        statsParser.startFeed();
        var rows = feed.split(this.DELIMITER_ROW);
        for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
            var row = rows_1[_i];
            statsParser.startRow();
            var cells = row.split(this.DELIMITER_CELL);
            for (var _a = 0, cells_1 = cells; _a < cells_1.length; _a++) {
                var cell = cells_1[_a];
                var keyValue = cell.split(this.DELIMITER_VALUE);
                statsParser.parse(keyValue[0], keyValue[1])
            }
            statsParser.endRow()
        }
        statsParser.endFeed();
        return statsParser.getParsedModel()
    };
    return FeedParser
}());

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question