» » page 3

 
Sort articles by: Date | Most Rates | Most Views | Comments | Alphabet

use PHP and JAVASCRIPT to judge visitor terminal - a computer or mobile phone

Author: bamboo06 on 2-12-2014, 02:29, views: 2602

5 When users use mobile phones and other mobile devices to access the site, we can detect a user terminal type program, if it is a mobile phone user, you guide the user to access the mobile phone screen adaptation sites. This article describes the use of PHP and javascript code separately to determine the user terminal type.
use PHP and JAVASCRIPT to judge visitor terminal - a computer or mobile phone

When users use mobile phones and other mobile devices to access the site, we can detect a user terminal type program, if it is a mobile phone user, you guide the user to access the mobile phone screen adaptation sites. This article describes the use of PHP and javascript code separately to determine the user terminal type.

Category: PHP Scripts / Javascript

 

PHP + jQuery + Ajax multiple image upload example

Author: bamboo06 on 11-11-2014, 02:03, views: 16386

2 Today I have to share is not refreshing the page under the premise of using PHP + jQuery + Ajax multi-picture upload results. Users only need to click to select the picture you want to upload, and then the picture is automatically uploaded to the server and displayed on the page.
PHP + jQuery + Ajax multiple image upload example

In this paper we use an Ajax form submission plugin: jqery.form.js, have an expert to modify a few lines of code and renamed: jquery.wallform.js, directly used.

Category: PHP Scripts / Javascript

 

Ajax form submission plugin - jquery form

Author: bamboo06 on 10-11-2014, 04:31, views: 1620

2 jQuery Form plug-in is an excellent Ajax form plugin, we can very easily use it to value processing form controls, clear and reset form controls, attachment uploads, and the completion of Ajax form submission. jQuery Form has two core methods ajaxForm () and ajaxSubmit (), in this article we focus on ajaxSubmit () applications.
Ajax form submission plugin -  jquery form

Category: PHP Scripts / Plugins

 

Use PHP + jQuery to achieve flap Sweepstakes

Author: bamboo06 on 8-11-2014, 04:11, views: 2645

6 There in a television program called the flap a lottery sweepstakes form for the time being, there is a stage wall, wall to place several large squares, host or sweepstakes who opened the box corresponding to announced the winning results. Similar lottery form can also be applied in the WEB, this article will use PHP + jQuery for you to explain how to achieve the flap lottery program.
Use PHP + jQuery to achieve flap Sweepstakes

Draw flap implementation process: Front page offers six squares, followed by the numbers 1-6 represent six different squares, when the draw clicks six squares in a one time, flip to the back of the box to show the winning lottery information. A seemingly simple procedure, but contains a lot of knowledge WEB technology, so the reader of this article should be proficient jQuery and PHP knowledge.

Category: PHP Scripts / Javascript

 

Use jQuery + PHP + Mysql to achieve lottery program

Author: bamboo06 on 8-11-2014, 03:41, views: 5577

6 Lottery program widely used in real life, due to the different application scenarios draw the way they are varied. This article will use examples to explain how to use jQuery + PHP + Mysql achieve a similar TV with a simple common lottery program.
Use jQuery + PHP + Mysql to achieve lottery program

In this case the lottery program to achieve massive phone numbers from a random sample of a number as the winning numbers, lottery multiple times, was drawn numbers will not be drawn again. Lottery process: Click the "Start" button, the program get number information, scroll the display number, click on the "Stop" button, the number stops rolling, then the number is the winning number is displayed, you can click the "Start" button to continue the draw.

Category: PHP Scripts / Javascript

 

jQuery + PHP dice Sweepstakes

Author: bamboo06 on 8-11-2014, 02:46, views: 2782

3 In this paper, Monopoly game as the background, the integrated use of jQuery and PHP knowledge, designed to throw the dice points to achieve the effect of the draw, of course, lottery probability is controllable, developers can use this example to some modifications to the site the raffle scene.
jQuery + PHP dice Sweepstakes

HTML
First, we need to prepare two dice and prizes clips. We will write the html page in the following html structure of the code, .wrap used to place the dice and message, # prize is used to place the prize.

Category: PHP Scripts / Javascript

 

Use PHP to analog logging in and accessing to data

Author: bamboo06 on 8-11-2014, 01:24, views: 1026

4 cURL is a powerful PHP library, using PHP's cURL library can be simply and efficiently crawl the web and collect content, set the cookie to complete the simulation login page, curl provides a rich set of functions that developers can get more from the PHP manual About cURL information. In this paper, the simulation Login Open Source China (oschina) as an example, and share cURL use.
Use PHP to analog logging in and accessing to data

PHP's curl () in terms of efficiency crawled pages is relatively high, and supports multi-threading, and file_get_contents () would be slightly more efficient, of course, need to open when using curl under the curl extension.

Category: PHP Scripts

 

Commonly used tags regex for PHP filter

Author: bamboo06 on 5-11-2014, 02:20, views: 2374

10 In php projects, often use to label some filtering regular expressions, collections for spare.
Commonly used tags regex for PHP filter

Category: PHP Scripts

 

Use PHP to deal with string encryption and decryption

Author: bamboo06 on 5-11-2014, 01:37, views: 1440

2 Sometimes we need to project a specific PHP information is encrypted, encrypted string that is generated by an encryption algorithm, the encrypted string can be decrypted by the decryption algorithm, to facilitate the decrypted program information is processed.
Use PHP to deal with string encryption and decryption

The most common applications in the user login, and some API data exchange scenarios.
I included some of the more classic PHP code encryption and decryption functions for everyone to share. Cryptographic principles generally through some encryption and decryption algorithms, the key is added to the algorithm, encryption and decryption finally get results.

Category: PHP Scripts

 

Use PHP generate a unique membership number

Author: bamboo06 on 4-11-2014, 03:55, views: 2949

41 When we want a huge number of data, while the median number have restrictions, such as license plate numbers 5, 10 of a document number, serial number of orders, short URL, etc., we can use the 36-ary calculated not repeat the numbers in line with the median.
Use PHP generate a unique membership number

We will use 0-Z (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) to represent the values ​​0-35, such as the letter Z represents 35. So I want to get a five numbers, the greatest amount of information is 36 5 th, and 36 ^ 5 = 60,466,176, which is equivalent to the maximum number of five decimal numbers: 60466176.
In order to do presentations in this article, we assume that a group of 10 paid a club membership number, membership number by three city ID card encoding +2 +5 bit checksum components. City number with area code indicated as 755 representatives of Shenzhen, five card numbers from card number consisting of 36 hexadecimal, followed by two check code is generated by a certain algorithm is able to use the checksum to verify the card number legitimacy. In this case, we generate 10 card number corresponds to the maximum to meet the 60 million membership number, and is not repeated unique card number.

Category: PHP Scripts / Javascript