echo "<script type="text/javascript">window.parent.CKEDITOR.tools.callFunction('".$_GET['CKEditorFuncNum']."','".$_FILES['upload']['name']."');</script>";
<textarea id="myeditor"></textarea> <script type="text/javascript"> CKEDITOR.replace('myeditor',{ filebrowserUploadUrl : 'upload.php'}) </script>