I Have a url here which I am using to send a post request to my server and I want to catch the EventType
, RessourceId
, and Date
, and put their values in a array if possible.
I am trying so many methods but for some reason I cannot get those information.
Here is the url
//POST
https://localhost/hello/index.php/kyc_succeeded_hook?EventType=SUCCEEDED&RessourceId=1309853&Date=1397037093
I used first this method,
$data = file_get_contents("php://input");
var_dump($data);
//I get nothing back.
Then I tried this
$Query_String = explode("&", explode("?", $_SERVER['REQUEST_URI'])[1] );
var_dump($Query_String);
I get values back like this in postman if I echo it
<pre class='xdebug-var-dump' dir='ltr'>
<b>array</b>
<i>(size=3)</i>
0
<font color='#888a85'>=></font>
<small>string</small>
<font color='#cc0000'>'EventType=SUCCEEDED'</font>
<i>(length=23)</i>
1
<font color='#888a85'>=></font>
<small>string</small>
<font color='#cc0000'>'RessourceId=1309853'</font>
<i>(length=19)</i>
2
<font color='#888a85'>=></font>
<small>string</small>
<font color='#cc0000'>'Date=1397037093'</font>
<i>(length=15)</i>
</pre>
<pre class='xdebug-var-dump' dir='ltr'>
<small>string</small>
<font color='#cc0000'>''</font>
<i>(length=0)</i>
</pre>
I am not sure how to put those values in a array.