Posted By

stamba on 11/10/10


Tagged

pdf save thumb export


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

tspitzr
jabier


Save as PDF & Thumb


 / Published in: PHP
 

  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  

You need to login to post a comment.