function check_mail($mail)
{
return preg_match("/^([a-z])([a-z0-9?\_?\.?]+)@([a-zA-Z?\.?]+)\.([a-zA-Z?]{2,6})$/i",$mail) ? true : false;
}
ini_set("display_errors",0);
if(check_mail($_POST[sts_email])==true)
{
$client = new SoapClient( "http://www.mailagent.ro/MailAgentService.wsdl");
try{
$response = $client->validateSubscriber( "Youth68Hfsb9bVF23wvsgiksUGH", 6745, $_POST[sts_email],
array( "birthdate" => date("Y-m-d H:i:s", strtotime( $_POST['datan'])),"city" => $_POST[oras] ),
array()
);
} catch ( SoapFault $e )
{
die( "Exception: " . $e->getMessage() );
}
//echo "Inregistrare newsletter: " . $response['op_status'] . "\n";
$status= 'Multumim ca te-ai inscris, '.$_POST[sts_email];
$_POST=array();
}
else
$status='Completeaza corect adresa de email.';
?>