{"id":5528,"date":"2025-07-18T16:22:59","date_gmt":"2025-07-18T09:22:59","guid":{"rendered":"https:\/\/affinitech.co.th\/?page_id=5528"},"modified":"2025-07-18T16:22:59","modified_gmt":"2025-07-18T09:22:59","slug":"5528-2","status":"publish","type":"page","link":"https:\/\/affinitech.co.th\/index.php\/5528-2\/","title":{"rendered":""},"content":{"rendered":"<div id=\"pl-5528\"  class=\"panel-layout\" ><div id=\"pg-5528-0\"  class=\"panel-grid panel-no-style\" ><div id=\"pgc-5528-0-0\"  class=\"panel-grid-cell\" ><div id=\"panel-5528-0-0-0\" class=\"so-panel widget widget_sow-editor panel-first-child panel-last-child\" data-index=\"0\" ><div\n\t\t\t\n\t\t\tclass=\"so-widget-sow-editor so-widget-sow-editor-base\"\n\t\t\t\n\t\t><h3 class=\"widget-title\">AFF<\/h3>\n<div class=\"siteorigin-widget-tinymce textwidget\">\n\t<p><!DOCTYPE html><br \/>\n<html lang=\"th\"><br \/>\n<head><br \/>\n    <meta charset=\"UTF-8\"\/><br \/>\n    <title>\u0e2a\u0e23\u0e49\u0e32\u0e07 CSR \u0e2d\u0e2d\u0e19\u0e44\u0e25\u0e19\u0e4c<\/title><br \/>\n<\/head><br \/>\n<body><\/p>\n<h2>\u0e41\u0e1a\u0e1a\u0e1f\u0e2d\u0e23\u0e4c\u0e21\u0e2a\u0e23\u0e49\u0e32\u0e07 CSR<\/h2>\n<form method=\"post\">\n        <label>Common Name (\u0e42\u0e14\u0e40\u0e21\u0e19):<\/label><br \/>\n        <input type=\"text\" name=\"commonName\" required\/><\/p>\n<p>        <label>Organization Name (\u0e0a\u0e37\u0e48\u0e2d\u0e1a\u0e23\u0e34\u0e29\u0e31\u0e17):<\/label><br \/>\n        <input type=\"text\" name=\"organizationName\" required\/><\/p>\n<p>        <label>Organizational Unit (\u0e41\u0e1c\u0e19\u0e01):<\/label><br \/>\n        <input type=\"text\" name=\"organizationalUnitName\"\/><\/p>\n<p>        <label>City \/ Locality (\u0e40\u0e21\u0e37\u0e2d\u0e07):<\/label><br \/>\n        <input type=\"text\" name=\"localityName\" required\/><\/p>\n<p>        <label>State \/ Province (\u0e08\u0e31\u0e07\u0e2b\u0e27\u0e31\u0e14):<\/label><br \/>\n        <input type=\"text\" name=\"stateOrProvinceName\" required\/><\/p>\n<p>        <label>Country Code (\u0e23\u0e2b\u0e31\u0e2a\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28 \u0e40\u0e0a\u0e48\u0e19 TH):<\/label><br \/>\n        <input type=\"text\" name=\"countryName\" maxlength=\"2\" required\/><\/p>\n<p>        <label>Email Address:<\/label><br \/>\n        <input type=\"email\" name=\"emailAddress\"\/><\/p>\n<p>        <input type=\"submit\" value=\"\u0e2a\u0e23\u0e49\u0e32\u0e07 CSR\"\/><br \/>\n    <\/form>\n<p><?php\nif ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n    $dn = array(\n        \"countryName\" => $_POST[\"countryName\"],<br \/>\n        \"stateOrProvinceName\" => $_POST[\"stateOrProvinceName\"],<br \/>\n        \"localityName\" => $_POST[\"localityName\"],<br \/>\n        \"organizationName\" => $_POST[\"organizationName\"],<br \/>\n        \"organizationalUnitName\" => $_POST[\"organizationalUnitName\"],<br \/>\n        \"commonName\" => $_POST[\"commonName\"],<br \/>\n        \"emailAddress\" => $_POST[\"emailAddress\"]<br \/>\n    );<\/p>\n<p>    $privkey = openssl_pkey_new(array(<br \/>\n        \"private_key_bits\" => 2048,<br \/>\n        \"private_key_type\" => OPENSSL_KEYTYPE_RSA,<br \/>\n    ));<\/p>\n<p>    $csr = openssl_csr_new($dn, $privkey, array('digest_alg' => 'sha256'));<br \/>\n    openssl_csr_export($csr, $csrout);<br \/>\n    openssl_export($privkey, $pkeyout);<\/p>\n<p>    file_put_contents(\"csr_output.csr\", $csrout);<br \/>\n    file_put_contents(\"private_key.key\", $pkeyout);<\/p>\n<p>    echo \"<\/p>\n<h3>\u0e14\u0e32\u0e27\u0e19\u0e4c\u0e42\u0e2b\u0e25\u0e14\u0e44\u0e1f\u0e25\u0e4c<\/h3>\n<p>\";<br \/>\n    echo \"<\/p>\n<ul>\";<br \/>\n    echo \"<\/p>\n<li><a href='csr_output.csr' download>\u0e14\u0e32\u0e27\u0e19\u0e4c\u0e42\u0e2b\u0e25\u0e14 CSR<\/a><\/li>\n<p>\";<br \/>\n    echo \"<\/p>\n<li><a href='private_key.key' download>\u0e14\u0e32\u0e27\u0e19\u0e4c\u0e42\u0e2b\u0e25\u0e14 Private Key<\/a><\/li>\n<p>\";<br \/>\n    echo \"<\/ul>\n<p>\";<br \/>\n}<br \/>\n?><br \/>\n<\/body><br \/>\n<\/html><\/p>\n<\/div>\n<\/div><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>\u0e2a\u0e23\u0e49\u0e32\u0e07 CSR \u0e2d\u0e2d\u0e19\u0e44\u0e25\u0e19\u0e4c \u0e41\u0e1a\u0e1a\u0e1f\u0e2d\u0e23\u0e4c\u0e21\u0e2a\u0e23\u0e49\u0e32\u0e07 CSR Common Name (\u0e42\u0e14\u0e40\u0e21\u0e19): Organization Name (\u0e0a\u0e37\u0e48\u0e2d\u0e1a\u0e23\u0e34\u0e29\u0e31\u0e17): Organizational Unit (\u0e41\u0e1c\u0e19\u0e01): City \/ Locality (\u0e40\u0e21\u0e37\u0e2d\u0e07): State \/ Province (\u0e08\u0e31\u0e07\u0e2b\u0e27\u0e31\u0e14): Country Code (\u0e23\u0e2b\u0e31\u0e2a\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28 \u0e40\u0e0a\u0e48\u0e19 TH): Email Address:<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5528","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/affinitech.co.th\/index.php\/wp-json\/wp\/v2\/pages\/5528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/affinitech.co.th\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/affinitech.co.th\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/affinitech.co.th\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinitech.co.th\/index.php\/wp-json\/wp\/v2\/comments?post=5528"}],"version-history":[{"count":1,"href":"https:\/\/affinitech.co.th\/index.php\/wp-json\/wp\/v2\/pages\/5528\/revisions"}],"predecessor-version":[{"id":5531,"href":"https:\/\/affinitech.co.th\/index.php\/wp-json\/wp\/v2\/pages\/5528\/revisions\/5531"}],"wp:attachment":[{"href":"https:\/\/affinitech.co.th\/index.php\/wp-json\/wp\/v2\/media?parent=5528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}