Skip to content

Instantly share code, notes, and snippets.

@miccheng
Created July 14, 2013 06:44
Show Gist options
  • Select an option

  • Save miccheng/5993428 to your computer and use it in GitHub Desktop.

Select an option

Save miccheng/5993428 to your computer and use it in GitHub Desktop.
<?php
set_time_limit(0);
$fp = fopen (PHOTO_PATH.$server_username.".jpg", 'w+');
$ch = curl_init("http://www.examp.com/test.jpg");
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
curl_close($ch);
fclose($fp);
echo "<img src="imagepath"/>";
ob_start();
$dompdf->load_html(ob_get_clean());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment