<?php
class douhaocms{ 
    public function sendurl($data){
		 $url = "https://cms.douhao.com/?m=api&a=getdomain&key=douhaocms";
		 $da['domain'] = $data;
		 $datas = http_build_query($da);	 
		 $ch = curl_init();      
		 $timeout = 60;       
		 curl_setopt($ch, CURLOPT_URL, $url);     
		 curl_setopt($ch, CURLOPT_REFERER, $_SERVER["HTTP_REFERER"]);    
		 curl_setopt($ch, CURLOPT_POST, true);      
		 curl_setopt($ch, CURLOPT_POSTFIELDS, $datas);      
		 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);		 
		 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);		 
		 curl_setopt($ch, CURLOPT_TIMEOUT , 10);
		 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
		 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
		 $source = curl_exec($ch);      
		 curl_close($ch);         		 
		 return $source;
	}
	
	public function sendlog($data){
		 $url = "https://cms.douhao.com/?m=api&a=getlog&key=douhaocms";
		 $da['data'] = $data;
		 $da['key'] = 'douhaocms';
		 $datas = http_build_query($da);	 
		 $ch = curl_init();      
		 $timeout = 60;       
		 curl_setopt($ch, CURLOPT_URL, $url);     
		 curl_setopt($ch, CURLOPT_REFERER, $_SERVER["HTTP_REFERER"]);    
		 curl_setopt($ch, CURLOPT_POST, true);      
		 curl_setopt($ch, CURLOPT_POSTFIELDS, $datas);      
		 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);		 
		 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
		 curl_setopt($ch, CURLOPT_TIMEOUT , 10);
		 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
		 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
		 $source = curl_exec($ch);      
		 curl_close($ch);         		 
		 return $source;
	}
  
}
?>