M
M
mishayurin2015-10-11 15:58:42
PHP
mishayurin, 2015-10-11 15:58:42

How to add the code for sending an array to the server?

71228ecb3a974e97a92356516668623b.jpg
This very array needs to be sent to the server, can you tell me how exactly this can be done?
PS: it is also desirable to loop the whole process for 1000 repetitions.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
W
WebDev, 2015-10-11
@mishayurin

Well, for example, translate into JSON and send?

T
Tlito, 2015-10-11
@tlito

stackoverflow.com/questions/19499891/php-post-to-a...myrusakov.ru/php-curl-post.html
_

A
Andrey, 2015-10-11
@airbreaker

Greetings from GetTaxi Rus LLC.
Better don't post.

I
Ivan Koryukov, 2015-10-11
@MadridianFox

Depends on the protocol by which the server receives data and in what format it expects this data. If the server requires data via http, then curl can be used. The data you've shown is an array, but it's not an array of unknown length with elements of the same type, but rather a list of key-value pairs. You can pass it as urlencoded query parameters. You can convert json and send in the body of the POST request. But again, it all depends on what the server is waiting for.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question