L
L
lexstile2018-07-03 23:47:51
PHP
lexstile, 2018-07-03 23:47:51

Can it be represented as $_GET?

I make a request via curl with the following parameters:

{"Language":"ru"}{"Params":["2018-07-03",null,1,null,null,180]}{"Vers":6}{"Adult":false} //$data_string

curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);

is it possible to present this request in the form:
site.ru/?Language=ru&Vers=6 , etc.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2018-07-03
@lexstile

it is possible if the receiving party is waiting for the get, not jason, or is ready to process both options.
otherwise, you can't.

A
Alexander Aksentiev, 2018-07-03
@Sanasol

this is some kind of malash porridge, not a data string.
4 different objects glued together.
Well, of course you can imagine, you only need to parse this line into something digestible.

[
  {
    "Language": "ru"
  },
  {
    "Params": [
      "2018-07-03",
      null,
      1,
      null,
      null,
      180
    ]
  },
  {
    "Vers": 6
  },
  {
    "Adult": false
  }
]

somehow it should be probably at least to parse as json, and not through the ass.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question