<?php
// Define CSR details
$dn = [
    "countryName" => "NP",
    "stateOrProvinceName" => "Bagmati",
    "localityName" => "Kathmandu",
    "organizationName" => "Giftmandu",
    "organizationalUnitName" => "NABIL106511",
    "commonName" => "p75.a65.mytemp.website", // Replace with the domain or server name
    "emailAddress" => "support@giftmandu.com"
];

// Generate a CSR using the private key and subject details
$csr = openssl_csr_new($dn, $privateKey);

// Save the CSR to a file
openssl_csr_export_to_file($csr, "request.csr");
openssl_pkey_export_to_file($privateKey, "private_key_for_csr.key");
?>
