---
title: "How to Approve Real Users and Block Fake Accounts at Sign Up with Lookup and Verify in PHP"
description: "The tutorial shows how to combine Twilio Lookup and Verify in a PHP sign-up flow that screens phone numbers before sending an OTP. It starts with Line Type Intelligence to accept mobile numbers, optionally checks reachability with Line Status, and uses Identity Match to compare submitted first and last names against authoritative sources without revealing underlying data. If those checks pass, the application sends a six-digit verification code and validates it through a Verify service. The provided implementation uses PHP 8.5, Slim, Twig, Monolog, and the Twilio REST client, with environment flags controlling optional checks and logs recorded in data/app.log. Testing covers mobile, toll-free, VoIP, and name-mismatch cases, while the pricing discussion recommends ordering cheaper checks before more expensive Identity Match and Verify calls."
---

# How to Approve Real Users and Block Fake Accounts at Sign Up with Lookup and Verify in PHP

[Twilio](https://yomu.fyi/company/twilio) · Kelley Robinson, Matthew Setter · Aug 31, 2026

**Type:** Tutorial

## Summary

The tutorial shows how to combine Twilio Lookup and Verify in a PHP sign-up flow that screens phone numbers before sending an OTP. It starts with Line Type Intelligence to accept mobile numbers, optionally checks reachability with Line Status, and uses Identity Match to compare submitted first and last names against authoritative sources without revealing underlying data. If those checks pass, the application sends a six-digit verification code and validates it through a Verify service. The provided implementation uses PHP 8.5, Slim, Twig, Monolog, and the Twilio REST client, with environment flags controlling optional checks and logs recorded in data/app.log. Testing covers mobile, toll-free, VoIP, and name-mismatch cases, while the pricing discussion recommends ordering cheaper checks before more expensive Identity Match and Verify calls.

## Context

The sign-up flow is intended to block fake accounts and unwanted bots while providing a seamless verification path for real users. The post also identifies cost as a consideration because the four checks use API packages with different prices, varying by country.

## Approach / What changed

Implement a four-layer pipeline in PHP using Twilio Lookup Line Type Intelligence, optional Line Status, optional Identity Match, and Twilio Verify phone verification. Environment variables control the optional checks, and the example uses Slim routes, Twig templates, Monolog logging, and a Twilio REST client.

## Takeaways

- Line Type Intelligence filters out landlines, nonfixed VoIP, toll-free numbers, and pagers while allowing the accepted line types to be customized.
- Identity Match checks firstNameMatch and lastNameMatch, accepting exact\_match or high\_partial\_match and rejecting no\_match, partial\_match, or null results.
- The flow places cheaper Line Type Intelligence and Line Status checks before the more expensive Identity Match and Verify calls, with pricing varying by country.

**Tags:** [API](https://yomu.fyi/topic/api), [Authentication](https://yomu.fyi/topic/authentication), [PHP](https://yomu.fyi/topic/php)

- Source: [Twilio](https://www.twilio.com/en-us/blog/developers/tutorials/product/block-fake-accounts-lookup-verify-php)
- Source URL: https://www.twilio.com/en-us/blog/developers/tutorials/product/block-fake-accounts-lookup-verify-php
- Ingested by Yomu: 2026-09-09T13:36:10.442Z

[Read original post](https://www.twilio.com/en-us/blog/developers/tutorials/product/block-fake-accounts-lookup-verify-php)
