how to save edited image locally using aviary web widget and php
<p>I plugged the feather aviary web widget into my site and it looks and plays fantastically.but I am having a hard time with php to save the edited images locally(from aviary server to my server) and i want to overwrite original image into edited image.i read the aviary documentation(www.aviary.com/web-documentation) but i don't understand how to save the edited images locally.
    here is aviary example:
</p>





<pre><code>&lt;script type="text/javascript"&gt;

    var featherEditor = new Aviary.Feather({
        apiKey: '1234567',
        apiVersion: 2,
        tools: ['draw', 'stickers'],
        onSave: function(imageID, newURL) {
            var img = document.getElementById(imageID);
            img.src = newURL;
        },
        postUrl: 'http://example.com/featherposturl'
    });

    function launchEditor(id, src) {
        featherEditor.launch({
            image: id,
            url: src
        });
        return false;
    }

&lt;/script&gt;                         

&lt;!-- Add an edit button, passing the HTML id of the image
    and the public URL to the image --&gt;
&lt;a href="#" onclick="return launchEditor('editableimage1', 
    'http://example.com/public/images/goat.jpg');"&gt;Edit!&lt;/a&gt;

&lt;!-- original line of HTML here: --&gt;
&lt;img id="editableimage1" src="http://example.com/public/images/goat.jpg"/&gt;
</code></pre>

<p>HERE is php coding:</p>

<pre><code>&lt;?php

    $image_data = file_get_contents($_REQUEST['url']);

    file_put_contents("photo.jpg",$image_data);

?&gt;
</code></pre>
