Phone Number Harvesting Protection

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
styks1987
Forum Newbie
Posts: 8
Joined: Wed Jun 16, 2010 10:03 am

Phone Number Harvesting Protection

Post by styks1987 »

I have some phone numbers that keep getting automated phone calls from being extracted from a web page. Is there a way I can print a number to a page while still maintaining the ability to select it but keep those sticky fingered robots off?

Thanks,
Phoned OUT!
shawngoldw
Forum Contributor
Posts: 212
Joined: Mon Apr 05, 2010 3:38 pm

Re: Phone Number Harvesting Protection

Post by shawngoldw »

look up robots.txt

That should help
styks1987
Forum Newbie
Posts: 8
Joined: Wed Jun 16, 2010 10:03 am

Re: Phone Number Harvesting Protection

Post by styks1987 »

Thank you for your help but unfortunately the robots I am dealing with will not obey the rules set by robots.txt

"In theory yes, in practice, no. If the bad robot obeys /robots.txt, and you know the name it scans for in the User-Agent field. then you can create a section in your /robotst.txt to exclude it specifically. But almost all bad robots ignore /robots.txt, making that pointless."

Any more ideas?

thanks
shawngoldw
Forum Contributor
Posts: 212
Joined: Mon Apr 05, 2010 3:38 pm

Re: Phone Number Harvesting Protection

Post by shawngoldw »

very true, I hadn't completely thought through your problem :oops:

what if you do some sort of weird formatting? Like put the phone number in 3 seperate divs?

Code: Select all

<div>(123)</div><div>456</div> <div>7890</div>
then style them to be inline with 0 padding and whatnot so it still looks normal. Maybe there's something simpler, but that could help?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Phone Number Harvesting Protection

Post by John Cartwright »

When displaying sensitive information such as emails or phone #s, where scrapping is potentially an issue, I have always generated an image with GD. Whilst not bullet proof (lookup captchas), it will surely stop 99.99% of the bots out there.
styks1987
Forum Newbie
Posts: 8
Joined: Wed Jun 16, 2010 10:03 am

Re: Phone Number Harvesting Protection

Post by styks1987 »

Hey thank you both for your help. If I generate an image, will the number still be able to be selected? I guess this might be asking too much. I will try the image.

Thanks!
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Phone Number Harvesting Protection

Post by Benjamin »

Bots are stupid. Just use javascript to display the number, or muck it up like this:

Code: Select all

88<b style="display: none;">092390</b>8-555-12<b style="display: none;">092390</b>12
Post Reply