title: create image from url using imagecreatefromjpeg
body: <p>I want to create image from php using the function <code>imagecreatefromjpeg(string $filename )</code>,
  but when I am providing a image URL as a parameter to this function then this function is not able to create image.</p>
  
  <pre><code>$pic = imagecreatefromjpeg('http://www.example.com/image.jpg');
  
  header("Content-type: image/jpeg");
  
  imagejpeg($pic);
  
  imagedestroy($pic);
  </code></pre>