Php regular expression to retrieve all links to content

Php regular expression to retrieve all links to content This example describes how to obtain all links of the content using a php regular expression. Share it with you for your reference. The details are as follows: Here we provide two

Php converts Chinese characters to pinyin

Php converts Chinese characters to pinyin Function Pinyin ($ _ String, $ _ Code = 'gb2312 ') { $ _ DataKey = "a | ai | an | ang | ao | ba | bai | ban | bang | bao | bei | ben | beng | bi | bian | biao | bie | bin

Php paging mysql Query Results

Php paging mysql Query Results Function pageSplit ($ startPos, $ rowsPerPage = '', $ totalRows = '') { $ NumPages = $ totalRows/$ rowsPerPage; $ TenthPages = $ rowsPerPage * 10; If ($ startPos >=$

Php binary search algorithm

Php binary search algorithm // $ Low and $ high have to be integers Function BinarySearch ($ array, $ key, $ low, $ high) { If ($ low> $ high) // termination case { Return-1; } $

PHP supports sending HTML-format mails

PHP supports sending HTML-format mails /** * Mail sending class * Supports sending plain text emails and HTML emails. * @ Example * $ Config = array ( * "From" => "*****", * "To" => "***",

Object-oriented php operation mssql class

Object-oriented php operation mssql class /* Untested */ Class database_mssql { Var $ database = NULL; Var $ sqls = NULL; Var $ host = NULL; Var $ username =

Php batch recursively delete folders with Files

Php batch recursively delete folders with Files Php's built-in rmdir can only delete empty directories. this rrmdir can recursively delete directories and all files in the directories. Function rrmdir ($ dir ){ If

360 php anti-injection code

360 php anti-injection code // Code By Safe3 Function customError ($ errno, $ errstr, $ errfile, $ errline) { Echo"Error number:[$ Errno], error on line $ errline in $ errfile"; Die (); }

PhpXSS security filtering code

PhpXSS security filtering code Function remove_xss ($ val ){ // Remove all non-printable characters. CR (0a) and LF (0b) and TAB (9) are allowed // This prevents some character re-spacing such // Note that

Php returns relative time, such as: 20 minutes ago, 3 days ago

Php returns relative time, such as: 20 minutes ago, 3 days ago Function plural ($ num ){ If ($ num! = 1) Return "s "; } Function getRelativeTime ($ date ){ $ Diff = time ()-strtotime ($ date );

Php uses socketpost to send data to other webservers

Php uses socketpost to send data to other webservers Function post_request ($ url, $ data, $ referer = ''){ // Convert the data array into URL Parameters like a = B & foo = bar etc. $ Data = http_build_query ($

Php browser detection type code

Php browser detection type code // Simple browser detection $ Is_lynx = $ is_gecko = $ is_winIE = $ is_macIE = $ is_opera = $ is_NS4 = $ is_safari = $ is_chrome = false; If (strpos ($ _ SERVER ['http _ USER_AGENT

Php implements simple syntax highlighting functions

Php implements simple syntax highlighting functions A simple syntax highlighted function implemented by php. note: This function is easy to design and may not be highlighted for some syntaxes. you can expand the function by yourself.

Php quickly obtains a small random array in a large number Group.

Php quickly obtains a small random array in a large number Group. You can click another group to refresh the recommended content. First, query the database to obtain the first 1000 data records, and then randomly remove four data records.

Comparing the similarity codes of two strings in php

Comparing the similarity codes of two strings in php How to Calculate string similarity similar_text and similarity in php $ First = "abcdefg "; $ Second = "aeg "; Echo similar_text ($ first, $ second); result

A php class for processing cookies

A php class for processing cookies Login Register Subscribe to RSS Website map Script sharing network // CookieClass // Copyright (C) 2005 JRSofty Programming. //

Php simple ftp file upload example

Php simple ftp file upload example Example of uploading a single file to an ftp server using php // FTP access parameters $ Host = 'ftp .example.org '; $ Usr = 'example _ user '; $ Pwd = 'example _ password ';

Use PHP to scale up or down images

Use PHP to scale up or down images Function resizeimage ($ srcfile, $ mySize ){ $ Size = getimagesize ($ srcfile ); Switch ($ size [2]) { Case 1: $ Img = imagecreatefromgif ($

Php symmetric encryption algorithm (DES/AES) code

Php symmetric encryption algorithm (DESAES) code /** * Common symmetric encryption algorithms * Supported keys: 64/128/256 bit (byte length: 8/16/32) * Supported algorithms: DES/AES (auto match based on key length:

Php compresses the file into a zip file

Php compresses the file into a zip file PHP ZipArchive is an extension class that comes with PHP. it can easily compress and decompress ZIP files. before using it, make sure that the php zip extension is enabled. /*

Total Pages: 12780 1 .... 9007 9008 9009 9010 9011 .... 12780 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.