Z
Z
zoro3132017-04-28 08:40:05
PHP
zoro313, 2017-04-28 08:40:05

How to upload video from the second server through PHP script?

Hello! There are 2 servers: the site is on the first one, the files are stored on the second one. For example, I have files on the second server called
video.mp4 server by taking the name of the desired file in the name parameter. Tried by returning script headers

header("Content-Type:video/mp4");
header("X-Accel-Redirect:site.ru/video/player.mp4");

but it didn't work - browser didn't play this video with reason: video format or MIME type not supported. Are there any other options? I saw a similar implementation on many sites, but I didn’t understand how to specifically give something like this through a script. Thank you in advance .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2017-04-28
@stweet

What does php and the server part have to do with it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question