Add to Google! Add to My Yahoo! Subscribe with Bloglines Pluck Add to NewsGator

March 2007

PHP Proper Case Function

27

March

PHP function to make the first letter of each word capital and the following letters lower case. If the first character is not a letter it capitalizes the second character.

PHP Proper Case Function


PHP Regular Expression (regex) Email Validation

26

March

function isValidEmail($email)
{
$myReg="/^[A-Za-z0-9_-]+@[A-Za-z0-9_-]+\.([A-Za-z0-9_-][A-Za-z0-9_]+)$/";
if(preg_match($myReg, $email))
return true;
else
return false;
}


PHP HTTP POST Request - with cURL

25

March

Here is a nice short function to execute an HTTP POST using cURL.

PHP HTTP POST Request With cURL 

There are no comments, but it is self explanatory.


PHP HTTP POST Request - without cURL

02

March

This snippet of code demonstrates how to execute an HTTP POST request without using curl.

This will not work in versions < PHP5 .

HTTP POST from PHP, without cURL