user=$credits[0]; $this->password=$credits[1]; $this->credentials="$this->user:$this->password"; } } function dm($user,$msg) { $url ="user=$user&text=".urlencode((stripslashes((urldecode($msg))))); $options=array( CURLOPT_POST=>1, CURLOPT_POSTFIELDS=>$url, CURLOPT_RETURNTRANSFER=>1, CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1, CURLOPT_USERPWD=>$this->credentials ); $res=curl_init($this->host); curl_setopt_array($res, $options); $this->output=curl_exec($res); $info = curl_getinfo($res); if ($this->output === false || $info['http_code'] != 200) { $this->output = "No cURL data returned for $url [". $info['http_code']. "]
"; if (curl_error($res)) $this->output .= "\n". curl_error($res); if($this->debug) { echo "
";
        print_r($this->output);
        echo "
"; } return false; } } function output($show=false) { if($show) { header ("content-type: text/xml"); echo $this->output; } else return $this->output; } function set_debug() { $this->debug=true; } } ?>