예제 #1
0
 public function upload()
 {
     $curl = new IzapCurl('http://elgg18.pluginlotto.com/spam_dump/index.php');
     $post_params = array('api_key' => IzapBase::APIKEY(), 'domain' => base64_encode(strtolower($_SERVER['HTTP_HOST'])), 'file' => "@{$this->dump_file}");
     $curl->setopt(CURLOPT_POST, TRUE);
     $curl->setopt(CURLOPT_POSTFIELDS, $post_params);
     $data = $curl->exec();
     if ($data['status']) {
         @unlink($this->dump_file);
         // delete file once it is uploaded
         return TRUE;
     }
     return FALSE;
 }