<?php
$fp = fsockopen('http://skks.1xbet.org', 80, $err_no, $err_str, 5);
$out = 'POST WebRegistrateUser HTTP/1.1
Host: test2.1xbet.lan
Content-Type: application/json; charset=UTF-8
Content-Length: 210
Connection: Close
{"date_time":"2016-06-17T12:49:31","source":2,"dep_id":8846131,"first_name":"qwe","middle_name":"qwe","last_name":"qwe","document_type":1,"document_country":"BLR","document_number":"123","document_issue":"qwe"}';
fwrite($fp, $out);
$arr = [];
if ($fp) {
while (!feof($fp)) {
$arr = json_decode(fgets($fp), true);
}
var_dump($arr);
fclose($fp);
} else {
var_dump($err_no, $err_str);
}
echo date('Y-m-d\TH:i:s');
preferences:
24.69 ms | 411 KiB | 5 Q