Jump to content

how to keep downloading software away


alarik149

Recommended Posts

Hi people.I want to discus with you a very important matter. Hopefully we can find a solution together.

I guess everyone knows that there are certain software, like teleport pro, that can download a website. This is very bad for people that have spend so many days trying to find a proper design or to write the content.

The problem that really concerns me is when you create a mysql database, you work days to have it ready, just inputing information, and then, some stupid person with teleport pro comes and steals all your information without even browsing/visiting the website.

 

Here is exactly what I consider is worth studying.

Let's say I completed my database and I have there 1000 types of trees, with complete information, places they grow, fruits, etc. I echo all this database within 14 pages and I create a little 'search engine'.

As far as I know, downloading software can't copy your website unless you have somewhere links to the specific page, so you could say I should just let the search engine without the 14 pages of listed trees. But that would be very noobish of me, wouldn't it?

 

The only way to get the problem solved, as far as I see, would be a little php script that can limit the 'clicks' in the website. For example I don't thing there is any user that can click 3 links in one second.

Can a script like this be done? I know little PHP and I tried to make something like this but nothing came out.

I need some help, and also, who ever has a better idea of keeping such software out of the website, please share;)

Regards...

Link to comment
https://forums.phpfreaks.com/topic/49183-how-to-keep-downloading-software-away/
Share on other sites

It can be done with ip address.

 

All you need is a mysql DB with a table ipclicks to store the information.

 

Than when each page is loaded do something like this:

 

function getClicks($ip=$_SERVER['REMOTE_ADDR']) {
    $sql = "SELECT clickedtime FROM ipclicks WHERE ip = '" . $ip . "' ORDER BY clickedtime LIMIT 3;"; // grabs the last 3 clicks
    $query = mysql_query($sql);
    
    $i=0;
    while ($row = mysql_fetch_assoc($query)) {
            $times[$i++] = $row['clickedtime'];
    }
    if ($i < 2) {
         $allow = true;
    }elseif ($i == 2) {
         // compare dates.
         for ($i=0; $i<count($times); $i++) {
                if (((time() - $times[$i]) < 30)) {
                     $allow = false;
                }
         }

         if (!isset($allow)) {
              $allow = true;
         }
   }else {
       $allow = true;
   }
   return $allow;
}

 

Note this is untested and assumes unix timestamp usage. But that is what you might be looking for. Basically if the last 3 times are within 30 seconds of the current time than do not allow that person to view the page.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.