Validate Email in PHP

Use this function to validate email in PHP.

Pass your email in this function by calling it.if  it returns false then email is not valid else valid.

function checkEmail($email_address = null){
if(preg_match("/^[a-zA-Z]*w+(.w+)*@w+(.[0-9a-zA-Z]+)*.[a-zA-Z]{2,4}$/", $email_address) === 0){
return false;
}
else{
return true;
}
}

How to share your page or website ?

<!-- AddToAny BEGIN -->
<div>
<a href="http://www.addtoany.com/share_save?linkurl=url_here&linkname=xyz">Share</a>
<span class="a2a_divider"></span>
<a class="a2a_button_twitter"></a>
<a class="a2a_button_f<acebook"></a>
</div>
<script type="text/javascript">
var a2a_config = a2a_config || {};
a2a_config.linkurl = "your url here";
</script>
<script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>
<!-- AddToAny END -->

Validate URL in PHP

To validate url at server side use this function.
In this function $variable defines the your string which you want to validate.

<?php 
$reg_exp = /(http?://)?([da-z.-]+).([a-z.]{2,6})([/w ?=.-]*)*/?$/
ereg($reg_exp,$variable);
?>