Home  >  Article  >  Backend Development  >  PHP cross-site file upload, how to solve it_PHP tutorial

PHP cross-site file upload, how to solve it_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:27:01924browse

PHP cross-site file upload

There is a video website A where users can upload videos.

Website B wants to call the interface of website A to upload videos, but the two websites are not on the same server.

UPLOADIFY plug-in for website A. How to implement cross-site upload?

 ------Solution--------------------

First of all, you need to make sure that you can control both stations A and B, or you want to use other websites to upload videos, but you don’t want users to go to other websites to upload videos.

If A and B are both under your control, A can just make an API call to B.

If A is someone else’s website, such as youku, you want to upload it to youku on your website and then get the video address.

This requires you to be able to simulate logging into youku, and then upload it through curl to get the return value and analyze it until you get the address.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/820423.htmlTechArticlePHP cross-site file upload There is a video website A, and users can upload videos. Website B wants to call the interface of website A to upload videos, but the two websites are not on the same server. UPLOA used by website A...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn