PHP gets the IP corresponding region and the type of network used

Seehttp://www.oschina.net/code/snippet_106370_5983This article, when testing because the ip168 site is forbidden, so try to modify the original code for the IP138 database data call The original program has a problem, is

Write Chinese or watermark on picture

Actually, it's a watermark. Session_Start (); Header ("Content-type:image/png"); Declaring pictures $image = imagecreate (417, 294); Create picture size $image = Imagecreatefrompng ("Cj.png"); $admin =

A PHP spider crawler made with curl, regular expressions

Phoenix Network FCMS Content Management systemGet.php crawl frame, analysis and processing of web content and related substitutionStd.php Universal Regularnews_67_com.php to Http://news.67.com's crawl analyzerCatch the list first, then grab the

One of PHP's simplest template engines

Self-use template engine. Define (' App_path ', __dir__); Class template{ private static $_vars; private static $_path; private static $_prefix; Private Function __construct () {} public static

PHP Simple Crawler

No details > function Get_urls ($url) { $url _array=array (); $the _first_content=file_get_contents ($url); $the _second_content=file_get_contents ($url); $pattern 1 = "/http:\/\/[a-za-z0-9\.

Another solution to the line lock for MySQL

Read an article on the Web:The original text reads as follows:*************************************************************************************** when doing the project due to business logic needs, the data table must be one row or more rows to

Pinyin based on Chinese characters, with encoding function

Pinyin based on Chinese characters, with encoding function /** * pinyin.php * Author: Cold cloud **/ function Pinyin ($_string, $_code= ' gb2312 ') { $_datakey =

PHP uses curl to download remote HTML files

It is said that using curl when downloading remote HTML files is a bit more efficient than file_get_contents. $ch = Curl_init (); curl_setopt ($ch, Curlopt_url, $url); Set the URL, which can be placed in the Curl_init

Two-dimensional array to fetch records according to conditions

No details > has an array of $point_history (see below) and takes out the line of user_id = 3. The code is as follows: //Your array $point _history = Array ( array ("id" =>1, "user_id" =>1, "PO INTs "=>2),

Filter content with HTML tags

Details can be consulted week The Secret Garden of the little snake----the filter HTML character of the PHP handwriting method http://zhousir.net/php-html-filtering-method-handwritten-characters.html function Html2text ($str) {

Replace the content label of a callback with a regular expression

function My_wp_plugin_tag_action ($content, $tag, $function, $args = FALSE) { Match all regular expressions Preg_match_all ($tag, $content, $matches); if (count ($matches) >0) { Filter Duplicates $matches =

PHP takes the remainder of the binary

I want to know how much 21712341byte is on the K-bit, M-bit, g-bit? This is equivalent to the problem of the conversion of the binary. But now the binary to be converted is 1024. //The value on the fetch bit function

Ajax Small Package Get,post request

A small package of Ajax's small package to get requests for Ajax function Ajax () { var xhr =null; if (window. XMLHttpRequest) { XHR = new XMLHttpRequest (); } else { XHR = new ActiveXObject

PHP implements RC4 encryption algorithm

ord

The decryption method of this algorithm is re-encrypted once and can be restored. /* * RC4 encryption algorithm * $pwd Key * $data the data to be encrypted */ function RC4 ($pwd, $data)//$pwd key $data need to

MyBatis Database Paging

Start to love the MyBatis interface-based approach.In fact, there are two parts of the change (based on the website demo): Add a paging plugin that is easy to use (feel good about yourself). Add a basemapper that abstracts

How to resize a picture on the server side

The resizing of the image on the server side is a lot more beneficial than the browser processing.This article describes how PHP adjusts the image size on the server side.The code consists of two parts: Imageresizer () is used to

Irregular two-dimensional arrays

No details > package com.sjzmlb.test; /** * * @author sjzmlb * */ public class Testarray { public static void Main (string[] args) { //-----Irregular two-dimensional

PHP code for images and Chinese watermarks

Header ("Content-type:image/png"); /* Notify browser, to output image */ $im = Imagecreate (400, 300); /* Define the size of the image */ $gray = Imagecolorallocate ($im, 235, 235, 235); $pink = Imagecolorallocate ($im, 255, 128,

Minismarty Simple Smarty

Simple Smarty for beginners to understand smarty help from itcast Hanshunping teacher Smarty 2nd, 3 speak Class myminismarty{ Public $template _dir = "./templates"; Public $complie _dir = "./templates_c";

Example of using Jsoup to extract all links from HTML

The byte order notation (English: Byte-order Mark,bom) is the Uniform Code character ("0 width without breaking blank") located in the code point U+feff. When UTF-16 or UTF-32 is used to encode a string of ucs/Uniform code characters, this character

Total Pages: 5208 1 .... 4264 4265 4266 4267 4268 .... 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.