Home > Article > Backend Development > PHP cross-site file upload, how to solve it_PHP tutorial
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.