PHP Ultimate Encryption Feature

F (ucking) U (ncrackable) e (ncryption) function by Blackhatdbl (www.netforme.net) function Fue ($hash, $times) { Execute the encryption (s) as many times as the user wants for ($i = $times; $i >0; $i--) { Encode with base64 .

Send mail with Phpmail class

function Send_mail ($title, $content, $from, $to, $charset = ' GBK ', $attachment = ') { Include '/class/phpmail.class.php '; Baidu two down Header (' content-type:text/html; charset= '. $charset); $mail = new Phpmailer (); $

PHP class for manipulating cookies

Class Cookie { /** * Decrypt a cookie that has already been encrypted * * @param string $encryptedText * @return String */ private static function _decrypt ($encryptedText) { $key = Config::get ('

A general method for obtaining remote images from PHP

function Auto_save_image ($body) { $img _array = Explode (' & ', $body); /* $img _array = array (); Preg_match_all ("/(SRC) =[\" |\ ' |] {0,} (http:\/\/(. *) \. (gif|jpg|jpeg|bmp|png)) [\"|\'| ] {0,}/isu ", $body, $img

Full PHP operation MySQL database class

Class Database { Private $hostname; Private $user; Private $pass; Private $dbname; Private $linkflag; Private $charset; function __construct () { $this->hostname= "localhost"; $this->user=

Sample code for PHP to read files

This PHP code details how to open the file, read the file and close the file, PHP can open the file through fopen, through the FileSize function to get the file size, Fread read the contents of the file, fclose close the file

Three ways to rounding PHP

PHP rounding three ways, respectively, by Number_format function, Round function and sprintf formatted output rounding 1.number_format method implementation rounding $number = 1234.5678; $nombre _format_francais =

PHP gets the user's real IP

If the user uses a proxy server, the real IP is not in the HTTP_CLIENT_IP header, but it needs to be resolved by HTTP header http_x_forwarded_for.The following PHP functions: function GetIP () {//Get IP if ($_server["http_x_

PHP randomly selects several non-repeating elements from an array

PHP randomly selects several unique elements from an array /* * $array = the array to be filtered * $total = The maximum number of items to return * $unique = Whether or not to remove duplicates before getting a

Code for PHP compression and decompression strings

The following PHP code compresses and compresses strings through gzcompress and gzuncompress, and can set the compression level $str = ' Hello I am a very very very very long string '; $compressed = Gzcompress ($str,

PHP Write data to CSV file sample code

PHP Write data to CSV file sample code $row = 0; Ini_set (' Max_execution_time ', 300); $cate, $item, $value, $US; $fp = fopen ("Torah1.csv", "w"); if ($handle = fopen ("T.csv", "R"))!== FALSE) { while

PHP translates Linux runtime into a better-looking format

PHP translates Linux runtime into a better-looking format $exec = shell_exec (' uptime '); $uptime = explode (' Up ', $exec); $uptime = Explode (', ', $uptime [1]); if (Strpos ($uptime [0], ' Day ')) {

PHP recursively executes chmod commands on folder recursion

function Recursivechmod ($path, $filePerm =0644, $dirPerm =0755) { Check if the path exists if (!file_exists ($path)) { return (FALSE); } See whether this is a file if (Is_file ($path)) { Chmod the

Tech Daniel, I want to learn PHP, please give us some advice

Programming is a technical work, not anyone can learn. Programming to withstand loneliness, need a willing to study the heart. Many companies like some self-taught people, do not like training institutions out of the people, because of the

400 error when post data is enabled for CSRF

Recently there has been such a mistake, has been looking for reasons, by chance to see a resolution of the article, share to everyone to see.The first solution is to close the CSRF Public Function init () {

Tutorials for configuring LNMP under the Debian system

LNMP environment configuration is required to let our host support Nginx, MySQL, PHP, PhpMyAdmin, so configured to use this environment directly, and run the site on the above, I will configure the method.We'll take a look at the official

PHP Directory Copy Implementation method

This article describes the PHP directory copy implementation method. Share to everyone for your reference. Specific as follows: function Copy_dir ($SRC, $DST) { $dir = Opendir ($SRC); @mkdir ($DST); while (false!=

Transferring session information using a URL

In the study of PHP, the session is often used by us, then today we will talk about the session in detail;First, the working mechanism of the session:When the session is opened, the server will save the session file in the server, and then save the

PHP implementation methods for editing and saving files

This article explains how PHP implements editing and saving files. Share to everyone for your reference. Specific as follows:save_file.php: Session_Start (); $handle = fopen ($_post[' original_file_name '), "

FastCGI process unexpected exit caused 500 error

On a new server, install a new Web site that was previously placed on only one site. is a server vendor configured, non-integrated environment.A new station was added and the path was set up, but there was a 500 error during the visit. Hint seems to

Total Pages: 5208 1 .... 4281 4282 4283 4284 4285 .... 5208 Go to: GO

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.