1

I want to hide the values inside my to prevent HTML Scraping. I'm using PHP and I build this table in a foreach loop.

<table>
   <tr>
      <td>value 1</td>
      <td>value 2</td>
  </tr>
</table>

Do you have some advice to give me to prevent people stealing my data ?

Jean C
  • 37
  • 5

2 Answers2

0

Today, you cannot prevent people to scrap your HTML 100%. But you could make it much harder. Adding some stuff into your HTML content, tags..etc..

If you use PHP, You could implement the Balagan repository on your pages.

I creates hidden values inside your specific values, it replaces tag names also.

Example: instead of <td>value 1</td>

It will be something like

<rxvcpnjjzcghqof> <script>blablabla</script>value 1<span>blabla</span> </rxvcpnjjzcghqof>

Also, if you use "Super Tags" on your value, there will be invisible strings between each letters like "V BLA a BLA l BLA u BLA e 1"

where "BLA" will be invisible on the browser.

This PHP Class create on-the-fly random code, create new DOM Nodes making much harder the scraping of your values, it worked for me.

The only difference stays on the fact that your CSS file must be a PHP file. I hope I helped you.

0

You can't completely prevent it, since whatever you do, determined scrapers can still figure out how to scrape.

Please view the following link for full details

How do I prevent site scraping?

Community
  • 1
  • 1
Sohail Mushtaq Awan
  • 666
  • 1
  • 8
  • 11