tribulant

PDF

Oct 6th, 2011
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. /*
  2. The host is
  3.  
  4. $this->url= "/htmldoc/pdf-o-matic.php";
  5. $this->host="www.easysw.com";
  6. */
  7.  
  8. function _convertEASYW()
  9.         {
  10.             //http://www.easysw.com/htmldoc/pdf-o-matic.php
  11.             $this->url= "/htmldoc/pdf-o-matic.php";
  12.             $this->host="www.easysw.com";
  13.             $s_POST_DATA = "URL=".urlencode($this->htmlurl);
  14.             $s_POST_DATA .= "&FORMAT=.pdf";
  15.             $pdfdata = @file_get_contents("http://".$this->host.$this->url."?".$s_POST_DATA);
  16.             if(!empty($pdfdata))
  17.             {
  18.                 if(!empty($this->saveFile))    
  19.                     $this->write_file($this->saveFile,$pdfdata);
  20.                 if(!empty($this->downloadFile))
  21.                     $this->download_file($pdfdata);
  22.                 return true;
  23.             }
  24.            
  25.             $pdfdata = $this->_sendRequest($s_POST_DATA);
  26.             if($pdfdata===false) return false;
  27.            
  28.             if(!empty($this->saveFile))    
  29.                 $this->write_file($this->saveFile,$pdfdata);
  30.             if(!empty($this->downloadFile))
  31.                 $this->download_file($pdfdata);
  32.  
  33.             return $pdfdata;           
  34.         }
  35.  
Advertisement
Add Comment
Please, Sign In to add comment