I'm trying to make a script that sends a file from my server to another server via POST method. The HTML may look like this:
<form action="https://anotherserver/receive.php" method="POST" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit" />
</form>
With this part, I can send a file from my computer to another server. But the script should send the file from my webserver, if a condition is true. For example, I create a file on my website, I hit "OK" and the file is automatically sent to the external webserver. Is it possible such a method? Any help is much appreciated.