$p, "text" => $s, "title" => "Register Account" )); // Initialize a cURL session $ch = curl_init($url); // Set cURL options curl_setopt($ch, CURLOPT_POST, 1); // Set method to POST curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // Set the POST fields curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // Set the headers curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return the response as a string // Execute the cURL request and store the response $response = curl_exec($ch); // Check for errors if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } else { echo $response; } // Close the cURL session curl_close($ch); ?>