PHP DateTime email validation foreach Random Number Random PHP Time Calculation REST S3 SendMail file_exists cookieEnabled Amazon S3 array AUTO_INCREMENT Amazon Simple Storage Service mail if get current file Referrer switch getenv HX5V include HTTP_REFERER Amazon Web Service Number Format password Open SSL Parameter Passing Formatted time string PHP array PHP Switch PHP_SELF printf Private URL protection Amazon EC2 _POST else Calculator Cardinal Endings Cloud Berry Content-Type bcadd count Ban IP address DateTime Format Delphi Internet Disable Session gmdate encryption File Upload 암호화 _GET array_count_values form handling Formatted date string Formatted date time string

REST.ZIP

Uploading files to Amazon S3 with REST API in PHP   (created at Sep 27, 2010)   229  

You can upload files with socket based REST API in PHP. In order to access Amazon S3 API, you need Access Key and Secret Key. Following is the example.   

Where to get AWS Access Key ?   (created at Sep 27, 2010)   127  

If you have an Amazon Web Service (AWS) Acount, you can get Access Key as below. [Account] –> [Security Credentials] –> [Access Credentials] For security reason, Access Key should NOT be shared with anyone.

How to create private URL on S3/CloudFront with time-limit ?   (created at May 26, 2011)   150  

For security reason, many companies may require one time temporary or private URL with time-limit. Some people call this as private or signed URL. Below URL is based on PHP and contains S3 signed URL generation function and CloudFront signed URL generation...

PHP Switch Example   (created at Oct 16, 2007)   46  

Here's php switch example

How to send email in PHP ?   (created at Oct 16, 2007)   39  

Send an email from PHP - one line example. 

How to pass variables via url   (created at Oct 16, 2007)   60  

Pass variables to a page using the question mark, for example mypage.php?value=hello.Access these variables with the _GET command.

How to declare array in PHP like C/C++   (created at Oct 16, 2007)   96  

simple php array declaration: 'Do', 'Re', 'Me');//print out arrayprint_r($notes);?>

PHP date and time formatting   (created at Oct 16, 2007)   55  

The Smarty date_format function returns a formatted string showing date, time and/or seconds.index.php:assign('yesterday', strtotime('-1 day'));$smarty->display('index.tpl');?>index.tpl:{$smarty.now|date_format}{$smarty.n...

How to redirect browser in PHP ?   (created at Oct 16, 2007)   48  

Using the php header function, a browser can be redirected to another page. 

How to get current filename as variable ?   (created at Oct 15, 2007)   63  

Sometimes you need just the filename of the current script, without the path. This snippet does just that using the SCRIPT_NAME and explode function.

email validation, simple   (created at Oct 15, 2007)   53  

Validate an email address - returns TRUE or FALSE. Checks format only, does not use any networking functions to verify the account actually exists.

for loop - simple   (created at Oct 15, 2007)   84  

for loop - basic control structure. This example loops until the variable hits 10 and then breaks out. 10) {       break;   }   echo $i;}?>sample output :12345678910

form action - detect form post   (created at Oct 15, 2007)   62  

There are several ways to process a php form. This example looks for the existance (regardless of value) of the Submit _POST variable.got submission
";   

How to make random number ?   (created at Oct 15, 2007)   58  

Generate a random number using mt_rand. From the php documentation- "If called without the optional min, max arguments mt_rand() returns a pseudo-random value between 0 and RAND_MAX. If you want a random number between 5 and 15 (inclusive), for example, us...

How to check if a file exists ?   (created at Oct 15, 2007)   52  

To determine whether a file exists on the server, PHP has a simple function: file_exists.

How to include a file with error reporting ?   (created at Oct 15, 2007)   47  

Sometimes you want to be able to give some feedback if a PHP include has failed. Here is a version using the fopen command, which can search the include path.

PHP if...else... example   (created at Oct 15, 2007)   66  

Followings are the basic example of an if then else control structure.

PHP form handling example in single page   (created at Oct 15, 2007)   70  

This example shows a very simple form together with the form handling process on a single page.got submission
";   ech...

How to get reffering URL ?   (created at Oct 15, 2007)   47  

Grabs the referring URL - get the HTTP_REFERER and save it to a variable.code snippet:

How to convert formatted date time string to datetime?   (created at Oct 12, 2007)   68  

Whatever the formatted string is, strtotime() function convert the formatted date time string to datetime.Following example shows the simple reference can convert date time string whatever the formatted input is...function foo($formatted_time){  retur...

How to remove or set time limit that defined as max_execution_time in php.ini   (created at Sep 18, 2007)   68  

PHP provides the alternate function which can control time limit that defined in php.ini. Following is the alternate function can control time limit.void set_time_limit (int seconds);Set the number of seconds a script is allowed to run. If this is reached,...

Adding and Subtracting Time   (created at Sep 13, 2007)   62  

The time () function generates a long string of numbers representing how many seconds have passed since January 1, 1970. It is possible to add and subtract time by adding and subtracting seconds.

The three simplest regular expressions you will use in PHP   (created at Sep 12, 2007)   95  

The three most basic searches using regular expressions are searching for the strings start, the strings end, or for characters it contains. We can do these using the following symbols:^ indicates the string starts with the specified characters, so "^strcp...

Send email Message With PHP   (created at Aug 25, 2007)   69  

This source code describes how to send email with php with headers

Array_count_values   (created at Aug 25, 2007)   102  

This code prints array count values

Calculator with basic four functions   (created at Aug 25, 2007)   67  

See below as calculator with basic four functions.
1st number:
2nd number:

What operation would you like to perform?

Number Format   (created at Aug 25, 2007)   66  

In this article we'll make number format like 0001, 0002, 0003 in stead of 1, 2 ,3. It's very easy to do this for your counter, category or product ID. etc. A Function Returns Large Random Numbers   (created at Aug 25, 2007)   61   This basically randomly pick a number between the min and max values. This is made because the rand() and mt_rand() function can not accept numbers larger than 2^31 or 2^63,depend on your processor and complier.

Function AccountCryptPassword($password,$salt)   (created at Aug 25, 2007)   86  

Encryption and password account accessFunction AccountCryptPassword($password,$salt) {  if($salt=="")  {   srand(time());   $random=rand();   $itoa64="./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; &n...

Cardinal Endings   (created at Aug 25, 2007)   55  

This php based script will find numbers and give them a cardinal ending. This can be useful for displaying rankings or results of a competition. The script is easy to install and use
Page: 1  2