mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-21 15:55:36 +08:00
Fix golang download website hash match pattern
This commit is contained in:
@@ -47,7 +47,7 @@ class go_xcaddy
|
|||||||
}
|
}
|
||||||
|
|
||||||
$version_regex = str_replace('.', '\.', $version);
|
$version_regex = str_replace('.', '\.', $version);
|
||||||
$pattern = "/href=\"\\/dl\\/{$version_regex}\\.{$os}-{$arch}\\.tar\\.gz\">.*?<tt>([a-f0-9]{64})<\\/tt>/s";
|
$pattern = "/class=\"download\" href=\"\\/dl\\/{$version_regex}\\.{$os}-{$arch}\\.tar\\.gz\">.*?<tt>([a-f0-9]{64})<\\/tt>/s";
|
||||||
if (preg_match($pattern, $page, $matches)) {
|
if (preg_match($pattern, $page, $matches)) {
|
||||||
$hash = $matches[1];
|
$hash = $matches[1];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user