Include html from remote server Edit then save on remote server - php

Let me begin with, that English is not my native tong.
There probably gonna be some miss-pelt words/sentences.
Explaining the situation:
I have bought a script for a lot of money that allows me to put it in the root directory and edit the static html documents with specific tags.
It saves the changes direct on the html.
i use it for old clients that bought a website from me a wile ago. (static html css websites)
Now i dont want to put the script on their own webserver, i would practically be giving away a script where somebody put a lot of time in.
The plan
Now i plan to put it on my own server next to my website.
The script allows me to save through a ftp connection.
so its save to say that it is possible to save from a remote server.
I manage to make a simple user script that let the client log in than php gets the ftp information from my sql server for the "ftp save function".
But now the real question
Is it possible for me to let my clients login onto my webserver and then "Include" their website into the session on my server and let the editor do his thing ?
so the script has to thing that it is on the root of the html document.
My explaining is probably unclear so let me add a image ;)
picaso
Thank you for your time ..
Hope to hear something from you all.

Related

Can PHP running on a remote server handle files on my computer?

I'm very new to programming, I know only HTML/CSS. I have an idea, I want to make a ittle more dynamic website. I want to find the programming language that suits my needs. The website I imagined should have a function like that:
If I go to the website there's a button. If I click on that button, theh website displays the files and folders of my local hard drive, for example my computer's C: partition. After that if I click on a file or folder, the program deletes that file.
Can PHP running on remote server handle local files like that? Can PHP program access my files from a remote server? If the answer is 'yes', could you help me with little code snippet, how can PHP do that, which part of the language can handle this situation?
Or do I have to choose another programing language?
(I ask about PHP because it seems to be the "first step" towards making dynamic websites and it's for general use. It would be good not to learn a very specific programming language as my first programming language...)
No it can't. You will need some java applet plus certified authorization or some VBScript with client approval. PHP ran only at server side and return the result as html to the web client
No. The remote server can only handle files you explicitly upload to it.

Send file from web server to a local machine using a...script?

I'm currently in development of a web based project. Majority of the project is either finished, or has a development plan. Let me mention right off the bat, besides my very limited HTML and CSS knowledge that I know very little to nothing of JavaScript or PHP. Which is why I have come here to ask for some advice, or quite possibly some help.
Right now, I have an HTML page with a form that users fill out. this form contains information about their specific options they have chosen. ( the users content is quite irrelevant at this time.)
When they submit, the contents of the form are saved in a .txt file in the root directory of my web server. ( along with the other contents of my site, the HTML, etc.. )
What I need help with or some more knowledge is how I can have that txt file sent to one of my local machine's here, from the web sites server.
The text file will need to be read from my local machine, and based on the user input my local machine will execute some JavaScript locally and what not ( this part of the process already has plan )
You can think of it kind of as a remote viewer/VNC kind of process. Excpet with alot more limitation for security/ease of use pruposes.
If anyone can help or enlighten me on some procedure that would do seomthing to this effect that would be great.
Regards,
Schoolpost

Save webpage to server folder

Is there any way to save a external web page to folder on server but with all webpage elements (JS files,images,css... etc.). Like you can do at browser with option save-complete-page but I need this to save with php on my server folder. And when include this folder to show the page as original. Maybe with curl or some php function ... ???
HOW TO DO THAT. please HELP!
p.s.I doing this for good reason not for stealing content!
and when I finising with operation and function I will empty the folder.
Are you saying that you want to visit a php site as a client (whether in a browser or via wget/curl/etc) and then save all related server-side files?
Without access to the server, that is not possible. The server-side content (e.g. the PHP pages and possibly some other parts of the site) are interpretted by the server before you as a client see any part of the site. You need server-side access to the files in order to see what is there before the code is interpretted.

How to open a browser in PHP?

Im here to ask a probably dumb question again. This is related to my previous questions.
I current found a way for flash/flex to send a video file(in byteArray) to php. Where php receives and writes it in the local sytem then sends it to the youtube server automatically trhu a script.
This is all backend though I have no way to check if the video file was uploaded succesfully in youtube than to check it manually in youtube.
So im thinking of a new php script where it will receive and write the video file from flash. Then opening a browser window where it will automatically upload the video and at the same time track it thru the browser of its status using debug prints perhaps.
Im barely still learning php. I tried to do some research on this but found no success. Hope you can help me guys. Thanks.
PHP code runs on your web server. It's code running on another computer. It can't open anything on YOUR computer. If it could, I would also be able to open windows on YOUR computer from the one I'm typing on, and you'd have some serious problems. By tomorrow everyone in the world would have their computers either taken over or destroyed by other random people on the internet.
PHP is server side, you can't directly use any PHP code to control browser activity on client side.
You need to resort to client side technology such as Flash and JavaScript.
echo "XXX window.open('URL');XXX'
XXX = script tag from Java, I can't post html tags

FTP-upload with PHP, print simple percentage?

hey guys,
i know there are a lot of "for-me-too-complicated" versions of progress-bars for php uploads out there.
however i have only a really basic knowledge of php and i have no idea how to implement this stuff.
i did a working file-upload script that transferres files from the user to my ftp-server. i'm using ftp_connect and ftp_put to do so.
i wonder how complicated it is to print a SIMPLE percentage value on to the page, to let the user know how far the upload has progressed.
i don't want any animated javascript stuff, just a simple percentage that shows the progress.
do you know a tutorial or something, or can you maybe give me a little explanation how i could do that. at least which methods return a progress value.
thank you in advance,matt
I know you said the flash uploaders are too complicated for you and you need a simple solution but the truth is there are none. If you could start your project over I would recommend using some known CMS with file upload support.
I think you should really give something like uploadify another chance. If you have problems with it ask here! There is a uploadify tag and really helpful peoples.
edit after your commenht: As seen on this page theres the idea to use uploadify to get the file to yoru server and then move it normally using ftp to your other space/server.
PHP/Apache talks to the client in a single request only. There is no simple way to actually have the client (know) how far the server is in the process. On uploads the file travels from the client to the server, so we generaly use Flash that can give us that information.
client (flash) -> server
What you are asking is something a bit fancier
client -> server -> ftp
And you want to know the progress between the server and the FTP. Mind you that even if you don't realize it the files are actually beeing transfered to the server and then from the server to the FTP server.
You will probably want to have the server update a database on given intervals with the progress so far and have the client AJAX the server to find out where the server is at.
You can also give socket.io a look!

Categories