title: imagecreatefromjpeg() php
body: <p>I'm using imagecreatefromjpeg() function to merge two pictures..</p>
  
  <p>now the problem which I'm facing is that when I use the pictures from my server, it works perfectly and when I use pictures from some other website, it doesn't work.</p>
  
  <p>For example: when I use this PHP file <a href="http://coolfbapps.in/test/merger.php" rel="noreferrer">http://coolfbapps.in/test/merger.php</a> with function</p>
  
  <pre><code> imagecreatefrompng('http://coolfbapps.in/test/1.png');
  </code></pre>
  
  <p>It works perfectly fine as the image is at my own server</p>
  
  <p>but when I alter this function n put the link of an image which is not on my server,</p>
  
  <p>for example. </p>
  
  <pre><code>  imagecreatefrompng('http://www.businesseconomics/Test.png');
  </code></pre>
  
  <p>it doesnt work. (the image file is not on my server)</p>
  
  <p>please suggest me an alternative to this function or a solution as I want to use this with Facebook apps..</p>
  
  <p>Functions like file-get-contents are also showing the same error. I hope its not server end problem..
         allow_url_fopen is on but 
         allow_url_include is off</p>
  
  <p><strong>Update...Actual code. I'm using this to merger two pictures</strong></p>
  
  <pre><code> $dest = imagecreatefrompng('http://coolfbapps.in/test/1.png');
  
   $src = imagejpeg('http://img.allvoices.com/thumbs/image/111/111/75152279-pic.jpg');
  
   imagealphablending($dest, false);
   imagesavealpha($dest, true);
  
   imagecopymerge($dest, $src, 10, 9, 0, 0, 181, 180, 100); 
  
   header('Content-Type: image/png');
   imagepng($dest);
  
   imagedestroy($dest);
   imagedestroy($src);
  </code></pre>