<?php
 /* *** WHMCS XML API Sample Code *** */
 
 $url = "http://www.afterfuture.net/clientes/includes/api.php"; # URL to WHMCS API file goes here
	$username = "zardet"; # Admin username goes here
	$password = "ssbtp=1174"; # Admin password goes here
 
	 $postfields["username"] = $username;
	 $postfields["password"] = md5($password);
	 $postfields["action"] = "validatelogin";
	 $postfields["email"] = "zardet@afnet.mx";
	 $postfields["password2"] = "bronx2216";  
 
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, $url);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_TIMEOUT, 100);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
 $data = curl_exec($ch);
 curl_close($ch);
  
 
 $data = explode(";",$data);
 foreach ($data AS $temp) {
   $temp = explode("=",$temp);
   $results[$temp[0]] = $temp[1];
 }
 
 
 
 if ($results["result"]=="success") {
	 echo "logeo";
   # Result was OK!
 } else {
	 echo "cago";
   # An error occured
   echo "The following error occured: ".$results["message"];
 } 
 ?>