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