F
F
foxjkeee2014-07-14 12:52:13
PHP
foxjkeee, 2014-07-14 12:52:13

How to process a post request to someone else's site that was created through a form (PHP)?

I'm trying to upload a photo to the Vkontakte album through my website using this instruction: vk.com/dev/upload_files
First of all, I get the URL to which the photo should be sent, then I display the following form:

<code lang="html">
//адрес, который был получен<form action="http://cs620420.vk.com/upload.php?act=do_add&mid=157498523&aid=178619624&gid=44869929&hash=3ea6fb2cafe41e7298a802026059a58b&rhash=e5fbf9b4e1d82d5db7b6f9fe382d1090&swfupload=1&api=1" method="post" enctype="multipart/form-data">
<input type="file" class="upload_input" name="file1" accept="image/*">
<input type="submit" class="button" value="Загрузить фотографию">
</form>
</code>

The user is given the opportunity to select a photo and send it.
But this is not enough, you still need to get the server's response in order to process it, I don't understand how to do it.
If this is not possible, then how can I upload a photo differently?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Skogorev, 2014-07-14
@foxjkeee

first send the file to your server. from there you send curl to VK and get a response

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question