title: Download image php - Facebook
body: <p>I'm using this php code in image.php file to merge a png image with text from facebook.</p>
  
  <p>Can someone please help me to download this image from image.php to my server. I have tried alot of coding but failed.</p>
  
  <p>code for image.php is: </p>
  
  <pre><code>&lt;?php 
  
  header("Content-Type: image/png"); 
  
  include_once 'facebook.php';
  include_once 'config.php'; //contains app id and secret key for fb app
  include_once 'token.php'; // contains access token and initiates a valid session
  $facebook = new Facebook(array(
  'appId'  =&gt; FACEBOOK_APP_ID,
  'secret' =&gt; FACEBOOK_SECRET_KEY,
  ));
  
  $me = $facebook-&gt;api('/me');
  $im = ImageCreateFrompng("certificate.png"); 
  
  $black = ImageColorAllocate($im, 0, 0, 0); 
  
  $start_x = 35; 
  $start_y = 230; 
  
  Imagettftext($im, 20, 0, $start_x, $start_y, $black, 'ambient.ttf', $me['name']); 
  
  Imagejpeg($im, '', 100); 
  
  ImageDestroy($im); 
  ?&gt;
  </code></pre>
  
  <p>Can someone please help me to download this image from image.php to my server. I have tried alot of coding but failed.</p>