Anti-Spam Images

  • Rafael Dohms
  • PHP
  • 2 min read

Vamos começar então pelo passado, antes de apresentar meus mais novos projetos vou começar pelo primeiro script ou classe que eu ofereci ao público em geral.

Naquela época era conhecida como Imagem de Verificação (Verification Image), e seu intuito era básico, gerar uma imagem com texto randômico que devia ser iterpretado pelo usuário e digitado, evitando assim o uso de “robots” que processem automaticamente os formulário, evitando fraude e abuso.

Uma classe bem simples e aparentemente muito útil, qual não foi minha surpresa quando agora, mais de 3 anos após publicar ela vejo essa classe estampada em varios sites pelo mundo, incluindo paises como alemanha e russia. É sempre bom ver que seu código foi útil para alguém, e verificar as várias modificações e melhorias que foram feitas,e que ainda existem pessoas do bem por ai que citam e mantêm o crédito do autor original :)

A classe se baseava em funcões de imagem do proprio PHP, como imagecreatetruecolor() dentre outras, gerando texto randômico com fontes diferentes, e orientações diferentes, evitando utilizar letras e numeros que possam ter dupla interpretação (1,l e I por exemplo). Além disso uma geração colorida e randomica de circulos e linhas a fim de dificultar a vida de ferramentas OCR.

Bem é isso, este link fornece o arquivo com exemplos, confira: aqui E o link para a o PHP CLASSES: aqui

comments powered by Disqus

Related Posts

Day to Day of a Principal Engineer

Day to Day of a Principal Engineer

  • November 18, 2026

This past weekend I led a mentoring session at CodeCon Select with Damiana Costa. What sets CodeCon Select apart is its participatory formats, like mentoring, fishbowls, and AMAs, where the audience helps shape the talk. That makes for a much richer event, and I highly recommend it.

Read More
The Pitfalls of the Big Rewrite: Why Evolution Often Beats Revolution

The Pitfalls of the Big Rewrite: Why Evolution Often Beats Revolution

  • April 16, 2025

In many conversations about how products and systems evolve within companies, a recurring theme emerges: the pitfalls we encounter. One of the most significant is the pattern of the major rewrite, sometimes called “building off to the side.” Now, don’t get me wrong – a well-executed strangler pattern can lead to amazing transformations of codebases and products. However, embarking on a major rewrite can also be the first step towards building a company’s own tombstone.

Read More
Closing a chapter

Closing a chapter

  • September 1, 2024

This is it; the house is mostly empty as I sit in my temporary home office, the living room table. Our Dutch lives are mostly in boxes in a container, and the only things left to go are Bella, our retriever, and me.

Read More