$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "GOOGLE"); // Обманочка
curl_setopt($ch, CURLOPT_HEADER, 0);
$output = curl_exec($ch);
echo '<pre>';
print_r( curl_getinfo($ch) );
echo '</pre>';
curl_close($ch);
echo $output;
Array
(
[url] => https://soccer365.ru/games/921770/
[content_type] => text/html; charset=UTF-8
[http_code] => 301
[header_size] => 539
[request_size] => 84
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.255368
[namelookup_time] => 0.000614
[connect_time] => 0.02999
[pretransfer_time] => 0.19802
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0.25531
[redirect_time] => 0
[redirect_url] => https://soccer365.ru//soccer365.ru/live/match-etyir-1924-levski-smotret-onlayn/
[primary_ip] => 51.15.25.134
[certinfo] => Array
(
)
)
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
}());