fork download
  1. <?php
  2. ob_start(); // Start output buffering
  3.  
  4. $ch = curl_init(); // Initialize cURL session
  5.  
  6. // Set the URL where you want to send the data
  7. curl_setopt($ch, CURLOPT_URL, 'https://l...content-available-to-author-only...t.com/dash.php');
  8.  
  9. // Set cURL options for the POST request
  10. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return the response as a string
  11. curl_setopt($ch, CURLOPT_POST, true); // Specify that this is a POST request
  12.  
  13. // Create an associative array with the data you want to send
  14. $data = [
  15. 'username' => 'test_user', // Example username
  16. 'password' => 'test_pass' // Example password
  17. ];
  18.  
  19. // Attach the data to the POST fields
  20. curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
  21.  
  22. // Execute the request and capture the response
  23. $response = curl_exec($ch);
  24.  
  25. // Check for errors
  26. if (curl_errno($ch)) {
  27. echo 'cURL Error: ' . curl_error($ch);
  28. } else {
  29. echo 'Response from server: ' . $response; // Print the response from the server
  30. }
  31.  
  32. // Close the cURL session
  33. ?>
  34.  
Success #stdin #stdout 0.03s 26108KB
stdin
<?php
ob_start(); // Start output buffering

$ch = curl_init(); // Initialize cURL session

// Set the URL where you want to send the data
curl_setopt($ch, CURLOPT_URL, 'https://l...content-available-to-author-only...t.com/dash.php');

// Set cURL options for the POST request
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return the response as a string
curl_setopt($ch, CURLOPT_POST, true); // Specify that this is a POST request

// Create an associative array with the data you want to send
$data = [
    'username' => 'test_user', // Example username
    'password' => 'test_pass'   // Example password
];

// Attach the data to the POST fields
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));

// Execute the request and capture the response
$response = curl_exec($ch);

// Check for errors
if (curl_errno($ch)) {
    echo 'cURL Error: ' . curl_error($ch);
} else {
    echo 'Response from server: ' . $response; // Print the response from the server
}

// Close the cURL session
curl_close($ch);
?>
stdout
cURL Error: Could not resolve host: lightningriskassessment.com