From 58cbf6795bd28477c8b53bb0202109df36a819e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=B9=BE?= Date: Tue, 15 Oct 2024 15:51:08 +0800 Subject: [PATCH] first commit --- README.md | 4 +--- crawl.php | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 crawl.php diff --git a/README.md b/README.md index 91c617f..c2775d2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -../ -/assets/捐赠.md /专栏/10x程序员工作法 /专栏/12步通关求职面试-完 /专栏/22 讲通关 Go 语言-完 @@ -158,4 +156,4 @@ /专栏/领域驱动设计实践(完) /专栏/高并发系统实战课 /专栏/高并发系统设计40问 -/专栏/高楼的性能工程实战课 +/专栏/高楼的性能工程实战课 \ No newline at end of file diff --git a/crawl.php b/crawl.php new file mode 100644 index 0000000..3562131 --- /dev/null +++ b/crawl.php @@ -0,0 +1,29 @@ +([^<]*)<\/a><\/li>/', $response, $matches); + + // Prepare the output for the readme file + $output = ""; + if (!empty($matches[1])) { + foreach ($matches[1] as $href) { + $output .= $href.PHP_EOL; + } + } else { + $output = "No match found.\n"; + } + + // Write the results to readme.txt file + file_put_contents("README.md", $output); + + echo "Results saved to readme.txt"; +} +?>