fork download
  1. <?php
  2. $userId = '15805';
  3. $orderId = '12345';
  4. $status = 'F';
  5. $url = 'https://a...content-available-to-author-only...n.tj/api/v1/paykar/webhook';
  6. $postData = ['user_id' => $userId, 'order_id' => $orderId, 'order_status' => $status];
  7. $headers = ['Content-Type: application/json', 'Authorization: Bearer 1fb4bc11c183b0b0063debf40e77f22b351a4889ecccd656fb35b555fb8a104a'];
  8. $myCurl = curl_init();
  9. curl_setopt_array($myCurl, [
  10. CURLOPT_SSL_VERIFYPEER => true,
  11. CURLOPT_SSL_VERIFYHOST => true,
  12. CURLOPT_HTTPHEADER => $headers,
  13. CURLOPT_RETURNTRANSFER => true,
  14. CURLOPT_URL => $url,
  15. CURLOPT_POST => true,
  16. CURLOPT_POSTFIELDS => json_encode($postData)
  17. ]);
  18. $response = curl_exec($myCurl);
  19. print($response);
  20. curl_close($myCurl);
  21. ?>
Success #stdin #stdout #stderr 0.03s 25972KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  curl_setopt_array(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead in /home/1Owg4S/prog.php on line 16