{"id":100,"date":"2010-05-10T16:19:00","date_gmt":"2010-05-10T15:19:00","guid":{"rendered":"https:\/\/www.onverify.com\/blog\/?p=100"},"modified":"2024-11-15T07:35:30","modified_gmt":"2024-11-15T07:35:30","slug":"how-to-add-phone-verification-to-your-website-with-onverify-coms-services","status":"publish","type":"post","link":"https:\/\/www.onverify.com\/blog\/2010\/05\/10\/how-to-add-phone-verification-to-your-website-with-onverify-coms-services\/","title":{"rendered":"How to add Phone Verification to your website with OnVerify.com&#8217;s Services"},"content":{"rendered":"<p>Adding a phone verification to your web site consists of following steps:<\/p>\n<ol>\n<li>Display form to get number<\/li>\n<li>Get number, generate pin code<\/li>\n<li>Initiate verification call over OnVerify.com<\/li>\n<li>Display Form to validate announced pin<\/li>\n<li>If entered pin is right, mark verification completed<\/li>\n<li>If entered pin is wrong, ask pin again<\/li>\n<\/ol>\n<p><strong>Display Form to Get Number<\/strong><\/p>\n<p>Here is a simple form to get number:<\/p>\n<blockquote>\n<div id=\"_mcePaste\">\n<div id=\"_mcePaste\">&lt;form method=&#8221;post&#8221;&gt;<\/div>\n<div id=\"_mcePaste\">&lt;input type=&#8221;hidden&#8221; name=&#8221;a&#8221; value=&#8221;call&#8221;&gt;<\/div>\n<div id=\"_mcePaste\">&lt;input type=&#8221;text&#8221; name=&#8221;number&#8221;&gt; (must be in international format ie 18581234567 (country code+areacode+number)<\/div>\n<div id=\"_mcePaste\">&lt;input type=&#8221;submit&#8221; name=&#8221;verify&#8221; value=&#8221;verify&#8221;&gt;<\/div>\n<div id=\"_mcePaste\">&lt;\/form&gt;<\/div>\n<\/div>\n<\/blockquote>\n<div><strong>Get Number, Generate Pin (PHP)<\/strong><\/div>\n<blockquote>\n<div>\n<div>$number = $_POST[number];<\/div>\n<div>if ($number) {<\/div>\n<div>$pin = sprintf(&#8220;%s%s%s%s&#8221;, rand(1,9), rand(1,9), rand(1,9),rand(1,9));<\/div>\n<div>$_SESSION[pincheck] = $pin;<\/div>\n<div>}<\/div>\n<\/div>\n<\/blockquote>\n<div><strong>Initiate Verification<\/strong><\/div>\n<div>youruserid and apipass is provided in your account when you logged in to OnVerify.com. yourtemplateid is listed under Templates tab. You can change the flow of the call from OnVerify.com<\/div>\n<blockquote>\n<div>$f = file(&#8220;http:\/\/www.onverify.com\/call.php?userid=youruserid&amp;apipass=yourapipass&amp;pin={$pin}&amp;template_id=yourtemplateid&amp;number={$number}&#8221;);<\/div>\n<\/blockquote>\n<p><strong>Display Form to Get Announced Pin<\/strong><\/p>\n<blockquote><p>a verification call is on the way, please enter the pin announced on the phone here to complete<\/p>\n<p>&lt;form method=post&gt;<\/p>\n<p>&lt;input type=hidden name=a value=getpin&gt;<\/p>\n<p>&lt;input type=hidden name=a value=getpin&gt;<\/p>\n<p>&lt;input type=text name=pin&gt;<\/p>\n<p>&lt;input type=submit name=verify&gt;<\/p>\n<p>&lt;\/form&gt;<\/p><\/blockquote>\n<p><strong>Check Entered Pin<\/strong><\/p>\n<blockquote><p><strong><span style=\"font-weight: normal;\">if ($_POST[pin]==$_SESSION[pincheck]) \u00a0{<\/span><\/strong><\/p>\n<p><strong><span style=\"white-space: pre;\"><span style=\"font-weight: normal;\"> <\/span><\/span><span style=\"font-weight: normal;\">echo &#8220;all ok. continue with other processing&lt;br&gt;&#8221;;<\/span><\/strong><\/p>\n<p><strong><span style=\"white-space: pre;\"><span style=\"font-weight: normal;\"> <\/span><\/span><span style=\"font-weight: normal;\">}<\/span><\/p>\n<p><span style=\"white-space: pre;\"><span style=\"font-weight: normal;\"> <\/span><\/span><span style=\"font-weight: normal;\">else echo &#8220;wrong pin&lt;br&gt;&#8221;; \/\/ redisplay pin entrance form<\/span><\/p>\n<p><\/strong><\/p><\/blockquote>\n<p><span style=\"font-weight: normal;\">Integration of OnVerify.com&#8217;s <a href=\"http:\/\/www.onverify.com\">Phone Verificatio<\/a>n is simple and straightforward. You can open a free account at OnVerify.com to see it in action and to test. <a href=\"http:\/\/www.onverify.com\/phone-verification-demo\">A real-time automated demo is located here<\/a>. <\/span><\/p>\n<p><a href=\"http:\/\/www.onverify.com\/sample.txt\">Download complete sample phone verification code<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding a phone verification to your web site consists of following steps: Display form to get number Get number, generate pin code Initiate verification call over OnVerify.com Display Form to validate announced pin If entered pin is right, mark verification<span class=\"ellipsis\">&hellip;<\/span><\/p>\n<div class=\"read-more\"><a href=\"https:\/\/www.onverify.com\/blog\/2010\/05\/10\/how-to-add-phone-verification-to-your-website-with-onverify-coms-services\/\">Read more <span class=\"screen-reader-text\">How to add Phone Verification to your website with OnVerify.com&#8217;s Services<\/span><span class=\"meta-nav\"> &#8250;<\/span><\/a><\/div>\n<p><!-- end of .read-more --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","footnotes":""},"categories":[5],"tags":[46,11,184,48,47],"class_list":["post-100","post","type-post","status-publish","format-standard","hentry","category-onverify-com","tag-add-phone-verification-to-your-website","tag-automated-phone-verification","tag-phone-verification","tag-sample-code","tag-steps-to-integrate-phone-verification"],"_links":{"self":[{"href":"https:\/\/www.onverify.com\/blog\/wp-json\/wp\/v2\/posts\/100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.onverify.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onverify.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onverify.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onverify.com\/blog\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":5,"href":"https:\/\/www.onverify.com\/blog\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"predecessor-version":[{"id":475,"href":"https:\/\/www.onverify.com\/blog\/wp-json\/wp\/v2\/posts\/100\/revisions\/475"}],"wp:attachment":[{"href":"https:\/\/www.onverify.com\/blog\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onverify.com\/blog\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onverify.com\/blog\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}