{"id":4033,"date":"2025-07-31T10:41:48","date_gmt":"2025-07-31T10:41:48","guid":{"rendered":"https:\/\/thedigitalbloggerr.com\/?page_id=4033"},"modified":"2025-08-20T17:16:05","modified_gmt":"2025-08-20T17:16:05","slug":"%f0%9f%8c%8d-currency-converter","status":"publish","type":"page","link":"https:\/\/thedigitalbloggerr.com\/hi\/%f0%9f%8c%8d-currency-converter\/","title":{"rendered":"Currency Converter"},"content":{"rendered":"<div style=\"text-align:center\"><img loading=\"lazy\" width=\"1200\" height=\"1898\" src=\"https:\/\/images.unsplash.com\/photo-1579807102908-396b3b737800?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMjA3fDB8MXxzZWFyY2h8N3x8Q3VycmVuY3klMjBDb252ZXJ0ZXJ8ZW58MHx8fHwxNzU0ODA5MzEzfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1200\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"Currency Converter\" title=\"Currency Converter\" loading=\"lazy\" decoding=\"async\" \/><\/div>\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"4033\" class=\"elementor elementor-4033\">\n\t\t\t\t<div class=\"elementor-element elementor-element-41c7a93 e-con-full e-flex e-con e-parent\" data-id=\"41c7a93\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-26269f8 elementor-widget elementor-widget-html\" data-id=\"26269f8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>Currency Converter - All Countries<\/title>\n  <style>\n    body { font-family: Arial; padding: 20px; max-width: 500px; margin: auto; background: #f9f9f9; }\n    h2 { color: #333; }\n    select, input { width: 100%; padding: 10px; margin: 10px 0; border-radius: 6px; border: 1px solid #ccc; }\n    button { padding: 10px; width: 100%; background: #28a745; color: white; border: none; border-radius: 6px; }\n    #result { font-weight: bold; margin-top: 20px; font-size: 18px; }\n  <\/style>\n<\/head>\n<body>\n  <h2>\ud83c\udf10 Currency Converter - All Countries<\/h2>\n\n  <input type=\"number\" id=\"amount\" placeholder=\"Enter amount\" \/>\n\n  <select id=\"fromCurrency\"><\/select>\n  <select id=\"toCurrency\"><\/select>\n\n  <button onclick=\"convert()\">Convert<\/button>\n\n  <div id=\"result\"><\/div>\n\n  <script>\n    const apiKey = 'YOUR_API_KEY'; \/\/ \ud83d\udd01 \u092f\u0939\u093e\u0902 \u0905\u092a\u0928\u0940 API Key \u0921\u093e\u0932\u0947\u0902\n\n    async function populateCurrencies() {\n      const url = `https:\/\/v6.exchangerate-api.com\/v6\/${apiKey}\/codes`;\n      const res = await fetch(url);\n      const data = await res.json();\n      const currencies = data.supported_codes;\n\n      const from = document.getElementById('fromCurrency');\n      const to = document.getElementById('toCurrency');\n\n      currencies.forEach(([code, name]) => {\n        const option1 = new Option(`${name} (${code})`, code);\n        const option2 = new Option(`${name} (${code})`, code);\n        from.appendChild(option1);\n        to.appendChild(option2);\n      });\n\n      from.value = \"USD\";\n      to.value = \"INR\";\n    }\n\n    async function convert() {\n      const amount = document.getElementById(\"amount\").value;\n      const fromCurrency = document.getElementById(\"fromCurrency\").value;\n      const toCurrency = document.getElementById(\"toCurrency\").value;\n\n      const url = `https:\/\/v6.exchangerate-api.com\/v6\/${apiKey}\/pair\/${fromCurrency}\/${toCurrency}\/${amount}`;\n      const res = await fetch(url);\n      const data = await res.json();\n\n      if (data.result === \"success\") {\n        document.getElementById(\"result\").innerText = \n          `${amount} ${fromCurrency} = ${data.conversion_result} ${toCurrency}`;\n      } else {\n        document.getElementById(\"result\").innerText = \"Error fetching conversion.\";\n      }\n    }\n\n    populateCurrencies();\n  <\/script>\n<\/body>\n<\/html>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; \ud83c\udf10 Currency Converter &#8211; All Countries Convert<\/p>","protected":false},"author":1,"featured_media":5211,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"googlesitekit_rrm_CAowz5S9DA:productID":"","footnotes":""},"class_list":["post-4033","page","type-page","status-publish","has-post-thumbnail","hentry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/thedigitalbloggerr.com\/hi\/wp-json\/wp\/v2\/pages\/4033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thedigitalbloggerr.com\/hi\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thedigitalbloggerr.com\/hi\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thedigitalbloggerr.com\/hi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thedigitalbloggerr.com\/hi\/wp-json\/wp\/v2\/comments?post=4033"}],"version-history":[{"count":8,"href":"https:\/\/thedigitalbloggerr.com\/hi\/wp-json\/wp\/v2\/pages\/4033\/revisions"}],"predecessor-version":[{"id":5734,"href":"https:\/\/thedigitalbloggerr.com\/hi\/wp-json\/wp\/v2\/pages\/4033\/revisions\/5734"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thedigitalbloggerr.com\/hi\/wp-json\/wp\/v2\/media\/5211"}],"wp:attachment":[{"href":"https:\/\/thedigitalbloggerr.com\/hi\/wp-json\/wp\/v2\/media?parent=4033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}