Verify the validity of the ID card in PHP.

Verify the validity of the ID card in PHP. /** * ID card * * @ Param string $ id * @ Return boolean */ Function is_idcard ($ id) { $ Id = strtoupper ($ id ); $ Regx = "/(^ \ d {15} $) |

PHP retrieves all links on the specified URl page-php Tutorial

PHP retrieves all links on the specified URl page // Obtain all links on the specified URL page Function get_url_href ($ url ){ $ Html = file_get_contents ($ url ); $ Dom = new DOMDocument (); @ $

PHP lists all databases in MySQL

PHP lists all databases in MySQL Define ('nl ', "\ n "); Define ('TB ',''); // Connecting to MySQL. $ Conn = @ mysql_connect ('localhost', 'username', 'password ') Or die (mysql_errno (). ':'.

Web proxy implemented by PHP

Web proxy implemented by PHP If (! Isset ($ _ REQUEST ["url"]) exit; $ U = $ _ REQUEST ["url"]; If (substr ($ u,-0, 7 )! = "Http: //") exit; Echo file_get_contents ($ u ); /*

Convert a pdf file to an image using imagebrick-php Tutorial

Convert a pdf file into an image using imagebrick $ Export _file = './pdf/demoting '; $ Save_to = './jpg/demo.jpg'; // make sure that apache has permissions to write in this folder! (Common problem) // Execute

PHP parses XML data

PHP parses XML data $ Xml_string =" Ben A H2o K "; // Load the xml string using

PHP code queried by whois

PHP code queried by whois Use the following function to obtain the complete details of any domain name user. Function whois_query ($ domain ){ // Fix the domain name: $ Domain = strtolower (trim ($ domain ));

PHP multi-dimensional array sorting

PHP multi-dimensional array sorting /* Function: sorts two-dimensional arrays by specified key values. $ Array = array ( 0 => array ('id' => 8, 'username' => 'phpernote '), 1 => array ('id' => 9, 'username' =>

Search Chinese characters or English letters by the first letter in PHP

Search Chinese characters or English letters by the first letter in PHP /** * */ Function getfirstchar ($ s0 ){ If ($ s0 [0] = 'I' | $ s [0] = 'I '){ Return "I "; } Elseif ($ s0 [0] = 'U' | $ s [0] =

PHP code for verifying URLs, emails, and ip addresses-php Tutorial

Verify the PHP code of the url, email, and ip address Function is_valid_url ($ url ){ $ P1 = '/(http | https | ftp): \ // [a-z0-9-] + (. [a-z0-9-] +) * (: [0-9] + )? (\/.*)? $/I '; Return preg_match ($ p1,

PHP simple image verification code implementation

PHP simple image verification code implementation // The first code generates a random image ------ code2.php // Enable session to save the generated content Session_start (); $ Table = array ( "Pic0" =>

PHP time processing functions-php Tutorial

PHP time processing functions // Mktime () Convert date and time to unix timestamp // Time () Obtains the unix timestamp of the current time. Echo date ("Y-m-d", mktime )).""; //

Php generates tag cloud based on word frequency

Php generates tag cloud based on word frequency Given a piece of text, this code analyzes the word frequency distribution of the text and generates a tag cloud /** * Tag cloud demo based on word frequency * @

Definitions of common PHP header

Definitions of common PHP header Header ('http/1.1 200 OK '); // OK for normal access Header ('http/1.1 404 Not Found '); // notifies the browser that the page does Not exist Header ('http/1.1 301 Moved

Php bar chart

Php bar chart /*** * @ Project Bar Graph Program * @ License GPL * @ Package * @ File GrapBar. php * @ Date 2007-4-3 * @ Version 1.0 * @ Last modified * Define the column

PHP file operations

PHP file operations // Filetype () Obtain the object type // Obtain the file type in windows Echo filetype ("D :\\ lamp \ php5 \ php. ini ").""; // The output file indicates a normal file.

Php checks whether the browser is a mobile device

Php checks whether the browser is a mobile device This code can be used to check whether users are using mobile devices to browse the web page. $ Mobile_browser = '0 '; If (preg_match ('/(up. browser |

Object-oriented mysql database operations php class

Object-oriented mysql database operations php class Class database { Var $ host = NULL; Var $ username = NULL; Var $ password = NULL; Var $ databaseName = NULL; Var $ link = NULL; Var $

Php numeric to Chinese character amount

Php numeric to Chinese character amount /** * Convert numbers to Chinese * @ Param string | integer | float $ num target number * @ Param integer $ mode [true: Amount (default), false: Normal number] *

Php dynamic processing of images and output display

Php dynamic processing of images and output display Php dynamically changes the image size and outputs the image. use the following address when outputting the image:Image_resize.php? Img‑image.jpg & w = 150 & h = 150 & constrain = 1W and h

Total Pages: 12780 1 .... 12035 12036 12037 12038 12039 .... 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.