如何使用aviary web小部件和php在本地保存编辑的图像

如何使用aviary web小部件和php在本地保存编辑的图像,php,jquery,Php,Jquery,我将feather aviary web小部件插入我的网站,它的外观和播放效果都非常棒。但我很难用php将编辑后的图像保存到本地(从aviary服务器保存到我的服务器),我想将原始图像覆盖到编辑后的图像中。我阅读了aviary文档(www.aviary.com/web documentation)但是我不知道如何在本地保存编辑的图像。 以下是鸟舍的例子: var featherEditor=新鸟舍。羽毛({ apiKey:'1234567', 版本:2,, 工具:[“画画”、“贴纸”], o

我将feather aviary web小部件插入我的网站,它的外观和播放效果都非常棒。但我很难用php将编辑后的图像保存到本地(从aviary服务器保存到我的服务器),我想将原始图像覆盖到编辑后的图像中。我阅读了aviary文档(www.aviary.com/web documentation)但是我不知道如何在本地保存编辑的图像。 以下是鸟舍的例子:


var featherEditor=新鸟舍。羽毛({
apiKey:'1234567',
版本:2,,
工具:[“画画”、“贴纸”],
onSave:函数(imageID,newURL){
var img=document.getElementById(imageID);
img.src=newURL;
},
姿势:'http://example.com/featherposturl'
});
函数启动编辑器(id,src){
羽化器({
图片:id,,
网址:src
});
返回false;
}
以下是php编码:

<?php

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

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

?>

<?php

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

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

?>