Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $url = 'http://api.wiseadvice.ru/erp/v1/pushordertoerp';
- $data = array(
- 'direction' => '000000002',
- 'name' => '(none)',
- 'companyName' => '(none)',
- 'phone' => '(none)',
- 'email' => '(none)',
- 'comment' => '(none)',
- 'inUrl' => '(none)',
- 'timestamp' => date_timestamp_get(date_create()),
- 'clientId' => '(none)',
- 'referrer' => '(none)',
- 'utmTerm' => '(none)',
- 'utmContent' => '(none)',
- 'utmCampaign' => 'test',
- 'utmSource' => 'FP',
- 'utmMedium' => 'FP',
- );
- $options = array(
- 'http' => array(
- 'header' => "Content-type: application/json\r\n",
- 'method' => 'POST',
- 'content' => json_encode($data)
- )
- );
- $context = stream_context_create($options);
- $result = file_get_contents($url, false, $context);
- if ($result === false) { }
- echo'<pre>';print_r($data);echo'</pre>';
- var_dump($result);
- die;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement