Answer the question
In order to leave comments, you need to log in
How to protect the phone number in the bulletin board from parsing?
I am doing a bulletin board as a training project and I was thinking how can I protect this kind of personal data like the phone number of the seller in the ad? After all, you cannot allow robots to stupidly parse the number so that the numbers then fall into the "black" spam databases.
Offhand, I assume several options:
1. Generate a number in the form of an image "on the fly" using the built-in php functions that create jpeg or png images
2. Broadcast the number through some built-in iframe with text copy blocking or something else
3. Using JS as -something track the visitor's behavior on the page and only if the behavior matches the pattern give click "show number".
How would you do it? Wondering what other concepts are out there? In general, without codes and other things, the approaches themselves are interesting.
Answer the question
In order to leave comments, you need to log in
Usually only part of the number is shown, to show the full number you need to click on it
As an educational project, don't make a molehill out of a molehill. This is the first and most important.
Until a special robot is set on your site, no one will ever parse an image or other mechanisms just like that. And since you are not Avito, this is an imaginary defense.
On my ad site, this is how it is done in terms of email addresses. The request goes like
/advert/frontend-ajax-get-email/id/110013/hash/8f3... - where the last parameter is the hash of the email and the salt. Without knowing the salt (and in general the hash creation algorithm) you will not receive an email in the response, here is an example with an invalid hash:
/advert/frontend-ajax-get-email/id/110013/hash/8f3...
this is a 100% way to protect from most parsers and PS.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question