# Create image from movieclip

**URL:** <https://forum.kirupa.com/t/create-image-from-movieclip/327745>\
**Category:** Uncategorized\
**Created:** [March 25, 2012, 11:35pm UTC](https://forum.kirupa.com/t/create-image-from-movieclip/327745 "2012-03-25T23:35:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Soder](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@Sebastian\_Soder](https://forum.kirupa.com/u/Sebastian_Soder)\
**Post date:** [March 25, 2012, 11:35pm UTC](https://forum.kirupa.com/t/create-image-from-movieclip/327745/1 "2012-03-25T23:35:30Z")

</div>

Hi I want to be able to create an image from a movieclip or the whole scene and upload it on a ftp server and to a database.

I have one working solution for something close to this but it only lets me download the image

\<?php  
switch ($\_POST[“format”])  
{  
case ‘jpg’:  
header(‘Content-Type: image/jpeg’);  
break;

```
case 'png':
header('Content-Type: image/png');
break;

```

}

if ($\_POST[‘action’] == ‘prompt’)  
{  
header(“Content-Disposition: attachment; filename=”.$\_POST[‘fileName’]);  
}

echo base64\_decode($\_POST[“image”]);  
?\>

how can I get this code to upload the image to the server and database instead?
