|
Description
An incomplete WHM class that will eventually be able to simply perform all functions of whm
<?php class swhm{ var $host=null; var $user=null; var $hash=null; var $sock=null; var $secure_sock=1; //Prepare the class for use function initialize(){ $this->hash=$hash; } function connect ($path){ if($this->secure_sock==1){ $this->sock=fsockopen("ssl://".$this->host,2087,$error_number,$error,30); }else{ $this->sock=fsockopen("http://".$this->host,2087,$error_number,$error,30); } if($error_number==0){ $this->error="Socket Error: Couldn't start the socket!"; return false; }elseif($this->sock==false){ $this->error="Socket Error: ".$error." ".$error_number; return false; } } } ?> |
|