Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleПример запроса
Code Block
languagephp
<?php
$pass = '***';
$data['key']= '***';
$data['action'] = 'inactiveINACTIVE';
$data['short_link'] = 'https://pltn.me/781nD';
$data['sign'] = md5(strtoupper(
          $data['key'].
          $data['short_link'].
                strrev($pass)
                ));
$url = https://secure.platononline.com/post-invoice/';
$crq = curl_init();
    curl_setopt($crq, CURLOPT_URL, $url);
    curl_setopt($crq, CURLOPT_HEADER, 0);
    curl_setopt($crq, CURLOPT_POST, 1);
    curl_setopt($crq, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($crq, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($crq, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($crq, CURLOPT_POSTFIELDS, http_build_query($data));
$result = curl_exec($crq);
if (curl_errno($crq)) {
    echo 'ERROR: '.curl_error($crq);
  }else{
    echo $result;
  }
curl_close($crq);

...