Automatically saving doc file after 20 secs [closed] - php

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
i am doing a php program which requires doc file to be saved after every 10 secs.msword should not ask the path to be saved. actually i have written a program which opens a doc file. the file should be auto saved to the exact location from where the file is opened.

If I understand you correctly, what you want to do is not possible (sadly).
There is no standard or protocol for live editing of remote files that have been downloaded from a web page in a browser. The file will be downloaded to a temporary location and opened from there.
Hence, any notion of providing an auto-save mechanism from PHP or JavaScript is completely impossible. The client application will have to do that.
If you want to upload the downloaded and locally edited file back to the web site, you will need to provide an upload form for the user to do it manually. (Which is a shame and completely unintuitive, but that's the way technology is at the moment.)

Not possible due to security reason in web technology.

Related

How to access the images/videos from another location (windows + disk E) in PHP? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
We have one .net application in which there is facility to upload images in given storage location. our application is completely windows based. and what it does is it stores images on given path for example "E:\Images".
On the other hand We are using using PHP application (using smarty framework) to display all our uploaded data. In this case everything working fine except images as the storage location is not within the PHP application directory.
I know with the help of symbolic link we can access the images from another disk. It is also working. But if we change the storage location later on then there will be a problem.
I also know that using base64 way we can access images. But it is taking too much time to load If I have a 30 images for one single record.
Can you please suggest a good way how can I access the images? Or how we can improve our symbolic link way?
PHP can access any area of the disk ifallowed. You may need to configure open_basedir to allow such access.

Run exe file from server, render to client [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I would like to know if it's possible to run a executable file (through any technology; PHP, JS, HTML...) on the web server, and render the image on the client.
I would like to do that to not share the exe file, but just let the client see what how the programm looks like without having him to download it. Also, using that way it won't affect the client PC.
It is possible to run application on server side and display result of application to client [1]. However, if your application uses GUI it might be difficult and required complex solution.
What if you:
Display screenshots of application
Let user book some online meeting where you would present the application through skype with shared desktop
Have public server where application would be installed and user could request username/password to server and try it itself (think about security!)

PHP how to simply upload video to server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to simply upload a video (MP4) to a folder on the website using PHP and be able to retrieve it. I searched several websites and questions on stackoverflow and all of them have not worked for me.
Without any code examples, it is kinda hard to answer, but here is something you can use as a starting point.
http://www.w3schools.com/php/php_file_upload.asp
Once you can get the file to upload to your PHP script (in temp storage on the server), you can then use PHP functions to move the file to a folder, or insert it into a database.
Be aware, the example is simple, and not super secure. You will want to enforce limiting mime types and file sizes to start.
If you get some code written and have issues, I would suggest updating your question so we can help.
You may run into a few issues with uploading.
Server permissions
File Size Limits
Folder permissions to put the file.
Note: The example I gave you is for images, but just look through it because obviously you can't use
getimagesize()
on a video.
You should be able to use this instead:http://php.net/manual/en/function.filesize.php
I would first focus on getting a basic, secure uploader working. From there you can do specific video stuff.
Good luck.

How can I use a script to convert a .wav and .webm saved on server into a .mp4 and save it on the server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Ok. So I have a website where I use a form to record information on the user and store it in a MySQL database. After you submit the form, it opens a page where there is a video and audio recorder setup. (At the top of this file, in the php, it also handles the form input.) So I have this part all done and it is working perfectly. The only problem is that the video/audio recorder saves two files which are named after the user who submitted the form, a .webm with video, and a .wav with the audio. What I want to do is make a script that combines the two into one .mp4 or .avi. The plugin I used for the recording is Here. I just want some advice on where to start. I am also fine with using some kind of plugin or something, because it is a private project.
PHP can't be used to do audio/video files conversions. To achieve what you want you have to use FFmpeg which is a command-line tool that runs on Linux and Windows.
If you don't have a least a VPS or dedicated hosting, there is no chance that your shared hosting provides this library.
With a small search on the internet I've found that: https://github.com/PHP-FFMpeg/PHP-FFMpeg

What's the best way to update PHP files to live server? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am accessing my remote server directory(/var/www) using the tool WINSCP. When I need to update a PHP file on the remote server, I work on a copy on my laptop (Windows 7), then I upload that copy to the corresponding directory at the remote server (by clicking right click on the file on the laptop directory, then I chose upload from the menu, then from the prompt I chose move and replace).
My question, during the transfer process, assume there is a user is using the system and he made a process was not done yet (let us say a process in mysql was working) and suddenly the PHP file is replaced with another one during the process. Will this make problem for my application? Is it healthy? Will it stop or a corruption will happen to database?
Shall I kick out all users before replacing PHP files at remote server? (that would be so hard option).
PHP read the whole script before running it, so replacing the file will have no effect on this, you can keep doing it like that.
If you have multiple PHP files and you are changing the API between them (add parameters to functions in your lib, for instance), you could run into trouble.
Same is if you use a database and you have to update your table definition.
As long as only a single PHP file changes, you are completely safe.

Categories