Online html editing, web eidting online |
Online html editing, web eidting online |
99rays |
Aug 13 2009, 01:38 AM
Post
#1
|
Group: Members Posts: 2 Joined: 13-August 09 Member No.: 9,418 |
hi guys
i have this requirement where in the client redirects a html page to my site and i have to provide him an interface from my site to edit the html ( which can be done using FCKeditor or Tinymce) and then when he presses save Ill have to save the html back to his server this is where i have some confusions, inorder to save back on his server do i need his ftp login credentials or is there any other way to circumvent, pls let me know thx in advance |
Christian J |
Aug 13 2009, 07:21 AM
Post
#2
|
. Group: WDG Moderators Posts: 9,658 Joined: 10-August 06 Member No.: 7 |
inorder to save back on his server do i need his ftp login credentials To save it manually, using FTP might be the simplest solution. To do it automatically you might use a server-side script on his server that can write the new content (with PHP, see file_put_contents). You also need some kind of password protection, like HTTP authentication, otherwise anyone could make changes on his pages. You also need to get the edited HTML from the editor on your server to his server script. If you put the finished HTML code in a hidden form field on your server, you might submit this form to his server-side script, which in turn saves the HTML on his server. Not sure how to handle the PW protection in that case, though: maybe you just submit the form, the PW login prompt shows up, and after entering the PW his server-side script runs. Possibly it would be more intuitive if the PW login prompt was shown before the user began editing. One way to do that would be that the user first went to a login page on his own server, entered the PW on that page's prompt, and after that continued to the editor on your server. |
99rays |
Aug 13 2009, 03:12 PM
Post
#3
|
Group: Members Posts: 2 Joined: 13-August 09 Member No.: 9,418 |
thx Christian for ur reply, I would be authenticating before letting him edit
and a silly question again, the server side script could be anywhere and I have to know the path of the html that is to be replaced with the new content right? I have to also allow him edit the CSS file if he has one, is there any such editors as fckeditor for CSS opensource and freely available, thank u if while editing the html if the user modify any image will the file_put_contents handle it |
Christian J |
Aug 13 2009, 04:44 PM
Post
#4
|
. Group: WDG Moderators Posts: 9,658 Joined: 10-August 06 Member No.: 7 |
I would be authenticating before letting him edit and a silly question again, the server side script could be anywhere No, the script that writes to his file must normally reside on his own server (possibly this http://php.net/manual/en/filesystem.config...allow-url-fopen is an exception, unless I misunderstand), and must therefore be PW-protected there. See also http://php.net/manual/en/function.file-put-contents.php QUOTE and I have to know the path of the html that is to be replaced with the new content right? Yes the server-side script on his server must know which of his files to rewrite. QUOTE if while editing the html if the user modify any image will the file_put_contents handle it If you mean editing (or uploading new) image files, then file_put_contents cannot do it. |
Lo-Fi Version | Time is now: 26th April 2024 - 03:25 PM |