From Dunga: Some websites will have a random quote, and each refresh will display a famous quote. So how does this work? Here's how to share the PHP version. After all, many of them are dynamic blogs.
Code 1:
Hello, you need to log in to our account to view the hidden content, please first Sign in To view!
Here is an interface shared by others. Each call will have a different quote.
Code 2:
This scheme comes from Meng Kun's blog, thanks for sharing.
First prepare a code editor, then create a new php file named api.php, and then create a new file named data.dat (both files need to be encoded in UTF-8, otherwise they will be garbled).
Hello, you need to log in to our account to view the hidden content, please first Sign in To view!
The content of data.dat is a famous sentence, one sentence per line.
Call method:
<script src="http://your website. cn/api. php"></script>
The above is about how the website realizes the function of random one word.
Text label: Random one word
A little Jack https://lkba.cn
The blogger focuses on Z-Blog website construction, website optimization, computer troubleshooting, reinstallation, optimization, maintenance system, etc., QQ/WX: 2126245521 (please specify the purpose)
Copyright © 2020-2023 Jack's works Reserved.
Powered By Z-Blog Sitemap | Shu ICP Bei No. 2023025269 - 1
Processed : 0.051 SQL : 14