Answer the question
In order to leave comments, you need to log in
When the donor site switched to ssl, the parser stopped working, how to fix it?
There was a standings parser from a sports site
<?php
$data = join("", file("http://www.vhlru.ru/"));
$a = ' <td class="table__align-left">';
$b = '</tr>';
if (
preg_match_all (
'#'.preg_quote($a).'(.+?)'.preg_quote($b).'#is', $data, $arr_table
)
)
$fh = fopen("table.txt", "w+");
for ($i=0;$i<count($arr_table[1]);$i++) {
$string = trim($arr_table[1][$i]);
$string = str_replace("\n","",$string);
$string = strip_tags(str_replace(' <td>','|', $string));
$string = str_replace(" |","|",$string);
fwrite($fh, $string."\n");
}
fclose($fh);
?>
Warning: file(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in */table/parser.php on line 5
Warning: file(): Failed to enable crypto in //table/parser.php on line 5
Warning: file(https://www.vhlru.ru/): failed to open stream: operation failed in */table/parser.php on line 5
Warning: join(): Invalid arguments passed in */table/parser.php on line 5
Warning: fclose() expects parameter 1 to be resource, null given in */table/parser.php on line 28
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question