April 2020
Nginx brute force solution After using CDN/load balancing, the IP recorded in the log is not the real user IP | Nginx obtains the real user IP
Search question bank (so. NowTool. cn), a good assistant of college students, supports search for answers of superstars, wisdom trees and learning powerful countries
TodayInHistory | Today's database PHP API in history
If you just want the API interface, please visit: Today's free API development documents in history
? Today InHistory | Today in history
? Tell me about the idea of reptiles
-
Download first https://zh.wikipedia.org/wiki/1 Month 1
reach https://zh.wikipedia.org/wiki/12 Month 31 366 days of pages (I took about 3 minutes to download them all) -
Then write the code( The best language in the world PHP). It took me a long time, about two or three hours (shame, limited level?) -
Export as after cleaning history_in_today.json file -
Then write the code( The best language in the world PHP) batch insert them into MySQL database -
Write API logic code. I use the ThinkPaPHP framework. Interface address: https://api.nowtime.cc/v1/today_in_history -
And then according to what I wrote before PrintNow/TimeLine Timeline, modified to index.html -
Then you see the project
? usage method
I prepared two copies of data history_in_today.sql and history_in_today.json
You can play freely, or use what I wrote, as follows?
-
? Prepare a PHP environment -
Download source code , after decompression Place site root directory -
take history_in_today.sql Import MySQL database -
Configure the database information in the api.php Lines 14-17 -
Modify line 3 of [static/script. js] () to https://api.nowtime.cc/v1/today_in_history replace with Http://your domain name/api.php -
open Http://your domain name/index.html -
enjoy ?