May 10 / admin

How to add Phone Verification to your website with’s Services

Adding a phone verification to your web site consists of following steps:

  1. Display form to get number
  2. Get number, generate pin code
  3. Initiate verification call over
  4. Display Form to validate announced pin
  5. If entered pin is right, mark verification completed
  6. If entered pin is wrong, ask pin again

Display Form to Get Number

Here is a simple form to get number:

<form method=”post”>
<input type=”hidden” name=”a” value=”call”>
<input type=”text” name=”number”> (must be in international format ie 18581234567 (country code+areacode+number)
<input type=”submit” name=”verify” value=”verify”>
Get Number, Generate Pin (PHP)
$number = $_POST[number];
if ($number) {
$pin = sprintf(“%s%s%s%s”, rand(1,9), rand(1,9), rand(1,9),rand(1,9));
$_SESSION[pincheck] = $pin;
Initiate Verification
youruserid and apipass is provided in your account when you logged in to yourtemplateid is listed under Templates tab. You can change the flow of the call from
$f = file(“{$pin}&template_id=yourtemplateid&number={$number}”);

Display Form to Get Announced Pin

a verification call is on the way, please enter the pin announced on the phone here to complete

<form method=post>

<input type=hidden name=a value=getpin>

<input type=hidden name=a value=getpin>

<input type=text name=pin>

<input type=submit name=verify>


Check Entered Pin

if ($_POST[pin]==$_SESSION[pincheck])  {

echo “all ok. continue with other processing<br>”;


else echo “wrong pin<br>”; // redisplay pin entrance form

Integration of’s Phone Verification is simple and straightforward. You can open a free account at to see it in action and to test. A real-time automated demo is located here.

Download complete sample phone verification code


leave a comment
  1. Carolyn Brown / Dec 30 2011

    Thank you for sharing with us such a good.Your article is written great!Carolyn

Trackbacks and Pingbacks

  1. Tweets that mention Published a new blog post: How to add Phone Verification to your website with's Services --
Leave a Comment