{"id":2175,"date":"2017-08-22T00:00:00","date_gmt":"2017-08-22T00:00:00","guid":{"rendered":"https:\/\/www.mailboxvalidator.com\/resources3\/articles\/consuming-mailboxvalidator-api-using-php\/"},"modified":"2026-07-30T08:03:36","modified_gmt":"2026-07-30T08:03:36","password":"","slug":"consuming-mailboxvalidator-api-using-php","status":"publish","type":"docs","link":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/","title":{"rendered":"Consuming the MailboxValidator API using PHP"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter\"><a href=\"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"600\" src=\"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3.png\" alt=\"Consuming-the-MailboxValidator-API-using-PHP\" class=\"wp-image-1063\" srcset=\"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3.png 1200w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3-300x150.png 300w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3-1024x512.png 1024w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3-768x384.png 768w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3-50x25.png 50w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3-920x460.png 920w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3-600x300.png 600w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3-320x160.png 320w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is the MailboxValidator API?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The MailboxValidator API is an easy to use RESTful API which allows a registered user to validate a single email address to make sure that the email is valid. Programmers can leverage on this API to validate form entries whenever users sign up for an account to make sure the supplied email address is not fake or a disposable email. There are many uses for email validations as the MailboxValidator API can also determine if an email is from a free email provider or if it is a role-based email address among other things.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Getting started\u00a0<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First of all, an API key is needed to be able to utilize this API. So head on to the <a href=\"http:\/\/www.mailboxvalidator.com\/plans#api\">API plans page<\/a> and sign up for the free API plan. Once you have done this, you&#8217;ll be assigned an API key. You&#8217;ll need to pass this key to the API during every query which we will demonstrate in our sample PHP code below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">API calling method via GET\u00a0<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Example of how to validate a single email address:<\/p>\n\n\n\n<div class=\"betterdocs-code-snippet-wrapper theme-light betterdocs-code-snippet-119217b3\"\n     id=\"betterdocs-code-snippet-119217b3\"\n     data-language=\"javascript\"\n          data-copy-button=\"true\">\n\n            <div class=\"betterdocs-code-snippet-header betterdocs-file-preview-header\">\n        <div class=\"betterdocs-file-preview-left\">\n                            <div class=\"betterdocs-traffic-lights\">\n                    <span class=\"traffic-light traffic-light-red\"><\/span>\n                    <span class=\"traffic-light traffic-light-yellow\"><\/span>\n                    <span class=\"traffic-light traffic-light-green\"><\/span>\n                <\/div>\n            \n                            <div class=\"betterdocs-file-info\">\n                    \n                                    <\/div>\n                    <\/div>\n\n        <div class=\"betterdocs-file-preview-right\">\n            \n                                    <div class=\"betterdocs-code-snippet-copy-container\">\n            <button class=\"betterdocs-code-snippet-copy-button\"\n                    type=\"button\"\n                    aria-label=\"Copy code to clipboard\">\n                <span class=\"betterdocs-code-snippet-copy-icon\" aria-hidden=\"true\">\n                    <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                        <rect x=\"9\" y=\"9\" width=\"12.5\" height=\"12.5\" rx=\"3\" stroke=\"currentColor\" stroke-width=\"1.7\"\/>\n                        <path d=\"M15.5 5.75V5A2.5 2.5 0 0 0 13 2.5H5A2.5 2.5 0 0 0 2.5 5v8A2.5 2.5 0 0 0 5 15.5h.75\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\"\/>\n                    <\/svg>\n                <\/span>\n                <span class=\"betterdocs-code-snippet-copied-icon\" aria-hidden=\"true\">\n                    <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                        <path d=\"M20 6.5 9.5 17 4 11.5\" stroke=\"currentColor\" stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\n                    <\/svg>\n                <\/span>\n            <\/button>\n            <span class=\"betterdocs-code-snippet-tooltip\"\n                  role=\"status\"\n                  data-copy-label=\"Copy\"\n                  data-copied-label=\"Copied!\"\n                  data-error-label=\"Copy failed\">Copy<\/span>\n        <\/div>\n                            <\/div>\n        <\/div>\n    \n    <div class=\"betterdocs-code-snippet-content\">\n                                <div class=\"betterdocs-code-snippet-panel is-active\"\n                 data-lang-index=\"0\"\n                 >\n                \n                <pre class=\"betterdocs-code-snippet-code language-javascript\"><code>GET https:\/\/api.mailboxvalidator.com\/v1\/validation\/single?email=test@test.com&amp;key=&lt;your API key&gt;&amp;format=&lt;json or xml&gt;<\/code><\/pre>\n            <\/div>\n            <\/div>\n<\/div>\n\n<script type=\"text\/javascript\">\ndocument.addEventListener('DOMContentLoaded', function() {\n    \/\/ Initialize copy functionality for this specific snippet\n    const snippet = document.getElementById('betterdocs-code-snippet-119217b3');\n    if (snippet && window.BetterDocsCodeSnippet) {\n        window.BetterDocsCodeSnippet.initCopyButton(snippet);\n    }\n});\n<\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are 3 parameters that the API will accept. The <strong>email<\/strong> parameter is mandatory and should be the email address you wish to validate. The <strong>key<\/strong> parameter is also mandatory and contains the API key you were assigned when you signed up for an API plan above. The last parameter <strong>format<\/strong> is optional so if you omit it, the default setting is to return the validation results in the form of a JSON string. You can also include this parameter with <strong>xml<\/strong> as the value if you want the results in an XML string.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Result fields<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Some of the important fields that you should be aware of are listed below along with some explanations of their meanings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><span class=\"codestuff\">is_free<\/span><\/strong> This will be True if the email is from a free email provider like Gmail. Otherwise it will be False.<\/li>\n\n\n\n<li><strong><span class=\"codestuff\">is_syntax<\/span><\/strong> This will be True if the email syntactically valid. Otherwise it will be False.<\/li>\n\n\n\n<li><strong><span class=\"codestuff\">is_domain<\/span><\/strong> This will be True if the email domain has a valid MX record in its DNS entries. Otherwise it will be False.<\/li>\n\n\n\n<li><strong><span class=\"codestuff\">is_smtp<\/span><\/strong> This will be True if the mail servers specified in the MX record respond to connection attempts. Otherwise it will be False.<\/li>\n\n\n\n<li><strong><span class=\"codestuff\">is_verified<\/span><\/strong> This will be True if the mail server indicates that the email address is valid. Otherwise it will be False.<\/li>\n\n\n\n<li><strong><span class=\"codestuff\">status<\/span><\/strong> This is the most important field as a True value here means our system has deemed the email address to have passed all of our validations. If it&#8217;s False, you should not send any emails to that email address as there will be a high chance of bounce.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">There are many other fields but we won&#8217;t cover them here. You can read more about them at the <a href=\"http:\/\/www.mailboxvalidator.com\/api-single-validation\">API documentation page<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sample usage<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Copy &amp; paste the below PHP codes into your webpage and insert your api key as well as your test email address. Then you can try your page to call the API and display the results.<\/p>\n\n\n\n<div class=\"betterdocs-code-snippet-wrapper theme-light betterdocs-code-snippet-00b4f9bd\"\n     id=\"betterdocs-code-snippet-00b4f9bd\"\n     data-language=\"php\"\n          data-copy-button=\"true\">\n\n            <div class=\"betterdocs-code-snippet-header betterdocs-file-preview-header\">\n        <div class=\"betterdocs-file-preview-left\">\n                            <div class=\"betterdocs-traffic-lights\">\n                    <span class=\"traffic-light traffic-light-red\"><\/span>\n                    <span class=\"traffic-light traffic-light-yellow\"><\/span>\n                    <span class=\"traffic-light traffic-light-green\"><\/span>\n                <\/div>\n            \n                            <div class=\"betterdocs-file-info\">\n                                            <div class=\"betterdocs-file-icon\">\n                                                            <span class=\"betterdocs-file-icon-emoji\">\ud83d\udc18<\/span>\n                                                    <\/div>\n                    \n                                    <\/div>\n                    <\/div>\n\n        <div class=\"betterdocs-file-preview-right\">\n            \n                                    <div class=\"betterdocs-code-snippet-copy-container\">\n            <button class=\"betterdocs-code-snippet-copy-button\"\n                    type=\"button\"\n                    aria-label=\"Copy code to clipboard\">\n                <span class=\"betterdocs-code-snippet-copy-icon\" aria-hidden=\"true\">\n                    <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                        <rect x=\"9\" y=\"9\" width=\"12.5\" height=\"12.5\" rx=\"3\" stroke=\"currentColor\" stroke-width=\"1.7\"\/>\n                        <path d=\"M15.5 5.75V5A2.5 2.5 0 0 0 13 2.5H5A2.5 2.5 0 0 0 2.5 5v8A2.5 2.5 0 0 0 5 15.5h.75\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\"\/>\n                    <\/svg>\n                <\/span>\n                <span class=\"betterdocs-code-snippet-copied-icon\" aria-hidden=\"true\">\n                    <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                        <path d=\"M20 6.5 9.5 17 4 11.5\" stroke=\"currentColor\" stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\n                    <\/svg>\n                <\/span>\n            <\/button>\n            <span class=\"betterdocs-code-snippet-tooltip\"\n                  role=\"status\"\n                  data-copy-label=\"Copy\"\n                  data-copied-label=\"Copied!\"\n                  data-error-label=\"Copy failed\">Copy<\/span>\n        <\/div>\n                            <\/div>\n        <\/div>\n    \n    <div class=\"betterdocs-code-snippet-content\">\n                                <div class=\"betterdocs-code-snippet-panel is-active\"\n                 data-lang-index=\"0\"\n                 >\n                \n                <pre class=\"betterdocs-code-snippet-code language-php\"><code>&lt;?php\n$apiKey = &#039;Enter_License_Key&#039;;\n$params[&#039;format&#039;]           = &#039;json&#039;;\n$params[&#039;email&#039;]     = &#039;Enter_Email&#039;;\n\n$query = &#039;&#039;;\n\nforeach($params as $key=&gt;$value){\n    $query .= &#039;&amp;&#039; . $key . &#039;=&#039; . rawurlencode($value);\n}\n\n$try = 0;\ndo {\n    \/\/\/\/\/\/\/\/\/\/\/\/\n    \/\/For https request, please make sure you have enabled php_openssl.dll extension.\n    \/\/\n    \/\/How to enable https\n    \/\/- Uncomment ;extension=php_openssl.dll by removing the semicolon in your php.ini, and restart the apache.\n    \/\/\n    \/\/In case you have difficulty to modify the php.ini, you can always make the http request instead of https.\n    \/\/\/\/\/\/\/\/\/\/\/\/\n    $result = file_get_contents(&#039;https:\/\/api.mailboxvalidator.com\/v1\/validation\/single?key=&#039; . $apiKey . $query);\n} while(!$result &amp;&amp; $rty++ &lt; 3);\n\n$data = json_decode($result);\n\nprint_r($data);\n?&gt;<\/code><\/pre>\n            <\/div>\n            <\/div>\n<\/div>\n\n<script type=\"text\/javascript\">\ndocument.addEventListener('DOMContentLoaded', function() {\n    \/\/ Initialize copy functionality for this specific snippet\n    const snippet = document.getElementById('betterdocs-code-snippet-00b4f9bd');\n    if (snippet && window.BetterDocsCodeSnippet) {\n        window.BetterDocsCodeSnippet.initCopyButton(snippet);\n    }\n});\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>What is the MailboxValidator API? The MailboxValidator API is an easy to use RESTful API which allows a registered user [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_category":[67],"doc_tag":[],"class_list":["post-2175","docs","type-docs","status-publish","hentry","doc_category-mailboxvalidator-articles"],"year_month":"2026-09","word_count":512,"total_views":"147","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"mbv_editor","author_nicename":"mbv_editor","author_url":"https:\/\/www.mailboxvalidator.com\/resources\/author\/mbv_editor\/"},"doc_category_info":[{"term_name":"MailboxValidator Articles","term_url":"https:\/\/www.mailboxvalidator.com\/resources\/article-categories\/mailboxvalidator-articles\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Consuming the MailboxValidator API using PHP -<\/title>\n<meta name=\"description\" content=\"MailboxValidator API is an easy to use RESTful API to validate an email address. Learn more on consuming the MailboxValidator API using PHP.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Consuming the MailboxValidator API using PHP -\" \/>\n<meta property=\"og:description\" content=\"MailboxValidator API is an easy to use RESTful API to validate an email address. Learn more on consuming the MailboxValidator API using PHP.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/mailboxvalidator\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-30T08:03:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@MailBoxV\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/consuming-mailboxvalidator-api-using-php\\\/\",\"url\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/consuming-mailboxvalidator-api-using-php\\\/\",\"name\":\"Consuming the MailboxValidator API using PHP -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/consuming-mailboxvalidator-api-using-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/consuming-mailboxvalidator-api-using-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/mbv_articles_img3.png\",\"datePublished\":\"2017-08-22T00:00:00+00:00\",\"dateModified\":\"2026-07-30T08:03:36+00:00\",\"description\":\"MailboxValidator API is an easy to use RESTful API to validate an email address. Learn more on consuming the MailboxValidator API using PHP.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/consuming-mailboxvalidator-api-using-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/consuming-mailboxvalidator-api-using-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/consuming-mailboxvalidator-api-using-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/mbv_articles_img3.png\",\"contentUrl\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/mbv_articles_img3.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/consuming-mailboxvalidator-api-using-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Base\",\"item\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Consuming the MailboxValidator API using PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#website\",\"url\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/\",\"name\":\"MailboxValidator Articles\",\"description\":\"MailboxValidator Articles\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#organization\",\"name\":\"MailboxValidator\",\"url\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/cropped-mailboxvalidator-fb-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/cropped-mailboxvalidator-fb-logo.png\",\"width\":1199,\"height\":399,\"caption\":\"MailboxValidator\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/mailboxvalidator\",\"https:\\\/\\\/x.com\\\/MailBoxV\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/mailboxvalidator\\\/\",\"https:\\\/\\\/www.pinterest.com\\\/mailboxvalidator\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCesIP5V7nXRXthaqdjjfCFg\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Consuming the MailboxValidator API using PHP -","description":"MailboxValidator API is an easy to use RESTful API to validate an email address. Learn more on consuming the MailboxValidator API using PHP.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/","og_locale":"en_US","og_type":"article","og_title":"Consuming the MailboxValidator API using PHP -","og_description":"MailboxValidator API is an easy to use RESTful API to validate an email address. Learn more on consuming the MailboxValidator API using PHP.","og_url":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/","article_publisher":"https:\/\/www.facebook.com\/mailboxvalidator","article_modified_time":"2026-07-30T08:03:36+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@MailBoxV","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/","url":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/","name":"Consuming the MailboxValidator API using PHP -","isPartOf":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/#primaryimage"},"image":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3.png","datePublished":"2017-08-22T00:00:00+00:00","dateModified":"2026-07-30T08:03:36+00:00","description":"MailboxValidator API is an easy to use RESTful API to validate an email address. Learn more on consuming the MailboxValidator API using PHP.","breadcrumb":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/#primaryimage","url":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3.png","contentUrl":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img3.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/consuming-mailboxvalidator-api-using-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mailboxvalidator.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Knowledge Base","item":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/"},{"@type":"ListItem","position":3,"name":"Consuming the MailboxValidator API using PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.mailboxvalidator.com\/resources\/#website","url":"https:\/\/www.mailboxvalidator.com\/resources\/","name":"MailboxValidator Articles","description":"MailboxValidator Articles","publisher":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mailboxvalidator.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mailboxvalidator.com\/resources\/#organization","name":"MailboxValidator","url":"https:\/\/www.mailboxvalidator.com\/resources\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mailboxvalidator.com\/resources\/#\/schema\/logo\/image\/","url":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2017\/11\/cropped-mailboxvalidator-fb-logo.png","contentUrl":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2017\/11\/cropped-mailboxvalidator-fb-logo.png","width":1199,"height":399,"caption":"MailboxValidator"},"image":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/mailboxvalidator","https:\/\/x.com\/MailBoxV","https:\/\/www.linkedin.com\/company\/mailboxvalidator\/","https:\/\/www.pinterest.com\/mailboxvalidator\/","https:\/\/www.youtube.com\/channel\/UCesIP5V7nXRXthaqdjjfCFg"]}]}},"_links":{"self":[{"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/docs\/2175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/comments?post=2175"}],"version-history":[{"count":1,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/docs\/2175\/revisions"}],"predecessor-version":[{"id":2618,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/docs\/2175\/revisions\/2618"}],"wp:attachment":[{"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/media?parent=2175"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/doc_category?post=2175"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/doc_tag?post=2175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}