Functions in PHP that may be used to encrypt strings [Base64_encode, UrlEncode, sha1]_php tips

Source: Internet
Author: User
The principle of login is still quite complex, like I thought Curl get the page again post up the idea is very simple.

A function that collates the price processing string that is encountered:

Copy Code code as follows:

<?php
$encryption = "username";
echo Base64_encode ($encryption);//echo "dxnlcm5hbwu=";
echo "<br>";
Echo UrlEncode ("http://". $encryption);//echo "Http%3a%2f%2fusername";
echo "<br>";
Echo SHA1 ($encryption);//echo "249ba36000029bbe97499c03db5a9001f6b734ec"
echo "<br>";
?>

Record their approximate appearance so that the processing of the class can be quickly identified later.

By the way, I found the script. Post address: http://www.jb51.net/article/29486.htm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.