Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "a": "sss",
- "b": "aaaa",
- "c": "ddd",
- "d": "ff",
- "e": 0,
- "f": "GMT+07:00",
- "g": "",
- "h": "",
- "i": "rrr",
- "k": "hhh",
- "l": "14.0.0",
- "m": [
- {
- "n": 5,
- "o": "xxx"
- }
- ]
- }
- function httpPost2($url,$params,$protocol="http")
- {
- $data_string = $params;
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array(
- 'Content-Type: application/json',
- 'Content-Length: ' . strlen($data_string))
- );
- $result = curl_exec($ch);
- }
- $posted= httpPost2("xxx/Elp/JSON/Authe",$posted) .'<br/>';
- var_dump($posted);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement