Save as PDF & Thumb


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. // save an url to a local pdf using pdfmyurl.com service
  3. public function url2pdf($url,$pdffilename) {
  4. return $this->copyFile("http://pdfmyurl.com?url=".urlencode( str_replace("http://","",$url) ), $pdffilename);
  5. }
  6.  
  7. // save an url to a local jpg thumb using open.thumbshots.com service
  8. public function url2thumb($url,$thumbfilename) {
  9. return $this->copyFile("http://open.thumbshots.org/image.pxf?url=".urlencode( $url ), $thumbfilename);
  10. }
  11. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.