A tool function library for Network

/*PHP Net Toolpack v0.1 08.05.2000,By waddler (@ netlife. fi)Phpnettoolpack.sourceforge.netTo be distributed under GNU GPL*/// Whois (hostname [, username, [port])Function whois ($ a_server, $ a_query = "", $ a_port = 43 ){$ Sock = fsockopen ($

PHP installation tips: FAQs (3)

VI,Q: How can I use the MAIL function to send emails in WINDOWS?A: PHP uses the SENDMAIL program to send mails in UNIX/LINUX. If SENDMAIL is not available in WINDOWS, you can use the SMTP protocol. The specific method is as follows: Modify PHP. SMTP

Free uploading of multi-user files without databases to the voting system (2)

This is the download. php of the system. It is mainly responsible for downloading and recording data. The file format is described in the annotations.// Input num as the file number to be downloaded, col = column to be downloaded// Ip address

Mysql-based forum (7)

# Sendmsg. phpRequire "func. php ";If ($ b1 ){If (is_user_exits ($ fromname) and check_user_password ($ fromname, $ password )){Sendmsg ();Echo "successful! ";}Else {$ Founderr = 1;Echo "Incorrect username/password! ";}}Else {?> send a message "

Support for oicq headers (1)

Features:Supports the oicq profile picture, automatic paging, display the ip address of the contact, and verify the validity of the email to facilitate secure message management,Without complex functions, beginners can easily understand them.Program

Code for capturing YAHOO stock quotes in real time

Function getYahooQuote ($ stockSymbol = "CCR "){If (! $ TargetURL) $ targetURL = "http://finance.yahoo.com/q? S = $ stockSymbol & d = t "; // set the URL target to be crawled$ Fd = fopen ("$ targetURL", "r ");$ StopExtract = 0;$ StartExtract =

Alternative Method for shielding browser cache

Sometimes we do not want the browser to use the cache to speed up the display of web pages, especially those that frequently update content such as forums. on the Internet, we can use the following methods to block the cache, but I tried it and it

Php Ubb code editor Function Code

Copy codeThe Code is as follows:/*Php Ubb Code Editor*/Function get_ubb ($ ubb ){$ Ubb = preg_replace ("/([B]) (. *) ([/B])/"," \ 2 ", $ ubb); // Replace the bold characters of B.$ Ubb = preg_replace ("/([I]) (. *) ([/I])/"," \ 2 ", $ ubb );$

Common php database configuration files

Config. php file:Copy codeThe Code is as follows:$ Db_name = "test ";$ Db_username = "root ";Global $ db_password;?> Database Operation class (call configuration file) db. fun. php:Copy codeThe Code is as follows:Require ("config/config. php

PHP encryption methods and principles

Copy codeThe Code is as follows:// Differentiate the numbers 0 and the characters O"$ OOO000000 = urldecode ('% 66% 67% 36% 73% 62% 65% 68% 70% 72% 61% 34% 63% 6f % 5f % 74% 6e % 64 ');// Decodes the encoded URL string. The decoded result is

Remove spaces at the beginning and end of a string in PHP

Method 1: Use the built-in functions of php/*Trim removes spaces at both ends of a string,Rtrim removes the right space of a string,Ltrim removes the left space of a string.*/?>Echo trim ("space"). " ";Echo rtrim ("space"). " ";Echo ltrim ("space").

Smarty configuration and advanced cache technology sharing

Preface Smarty is an excellent PHP template engine that separates logical code from user interface.Learning and using Smarty without applying it to the cache technology is a huge loss. It can cache the HMTL file that the user finally sees into a

PHP: refactoring-improving the design of existing code-4 Simplified conditional expressions

Mind MapClick to view the chart. The introduction of conditional logic may be very complicated. Therefore, this chapter provides some refactoring techniques to simplify them. Full text description(You can skip the following content) Core refactoring:

Php development page implementation code 1/3 page

Project Structure: Running effect: Conn. php Copy codeThe Code is as follows: $ Conn = @ mysql_connect ("localhost", "root", "") or die ("Database Link error "); Mysql_select_db ("form", $ conn ); Mysql_query ("set names 'gbk'"); // use GBK

Php entry-a class connecting to the mysql database

Project Structure: Running effect; Conn. phpCopy codeThe Code is as follows:Class ConnectionMySQL {// HostPrivate $ host = "localhost ";// Database usernamePrivate $ name = "root ";// Password of the databasePrivate $ pass = "";// Database

Summary of PHP code specifications

Naming rulesAll the hosts files are suffixed with. class. php. They are named by the camper method and capitalized, for example, Pay. class. php;The category class name and the Directory _ file name are consistent. For example, the Directory of the

PHP reverse string function strrev () Usage

I really want to create a function for Baike. I only write WEB Development notes because of my limited energy. I am busy updating an article a day, because, my career is not just about writing this blog, but there are many other websites that need

Php _ autoload automatic loading class and Mechanism Analysis

To use a class before PHP5, you only need to directly include it using include/require.Test. class. phpCopy codeThe Code is as follows:Class abc {Function _ construct (){Echo 'www .hzhuti.com;}}?> Load. phpThe Code is as follows:Copy codeThe Code is

Functions in php that may be used to encrypt strings [base64_encode, urlencode, sha1]

The logon principle is quite complicated. I thought it was too simple to get the page from curl and then post it.Sort out the price processing string functions:Copy codeThe Code is as follows:$ Encryption = "username ";Echo base64_encode ($

Three problems encountered when debugging a PHP Program

1. The filesize () function returns an error value. When you use curlto download a page to a folder, you can read the contents of the downloaded tmphtml.txt file to a buffer zone. Because I use fread () for reading and need to input the size of the

Total Pages: 12780 1 .... 7139 7140 7141 7142 7143 .... 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.