Recently, I am helping my friends develop a brand new website. it was designed to be concise and easy to access. As a result, it is not very considerate and not very satisfied with some designs. For example, website navigation, comments, and communities still need to be improved. However, I have summarized some PHP application skills during the development process and would like to share them with you. Recently, I am helping my friends develop a brand new website. it was designed to be concise and easy to access. As a result, it is not very considerate and not very satisfied with some designs. For example, website navigation, comments, and communities still need to be improved. However, I have summarized some PHP application skills during the development process and would like to share them with you.
First, the first example fully demonstrates that the combination of simple REST APIs and SimpleXML has a practical effect.
For a long time, I have been used to using FeedBurne because it clearly shows the number of registered users. As part of this website design, I hope to get this number without using an image. Enter the FeedBurner Awareness API and run the following two-line PHP command:
Feed-> entry ['circulation'];?>
When the URL length is too long, the format is not easy to grasp. At this time, the best solution is to shorten the URL length, and the most moderate URL length is the first X characters and the last Y characters. As follows:
$ Max_length) {$ first_chunk = substr ($ url, 0, $ first_chunk_length); $ last_chunk = substr ($ url,-$ last_chunk_length); return $ first_chunk. $ separator. $ last_chunk;} return $ url;} $ url = 'http: // averylongdomainname.org/a/very/long/path/to/averylongfilename.pdf'; $ short_url = shorten_url ($ url );
In this way, you can connect to $ url and display $ short_url. You can also clearly see the link.