Quick PHP coding question

Forum
Last Post
Threads / Messages

herbaceous

loves layouts
Member
Joined
Feb 14, 2012
Messages
26
Points
0
Mysidian Dollar
0
I've gone through my users list and found a large number of what could be spam accounts. Does anyone know how I can edit the coding and MySQL data tables so that user ISPs also come up?
 
I'm new to coding, so I'm still kind of fumbling with MySQL/PHP. e.o;

Like, would it make a difference where I edit in the code to track ISPs?
And, how would I change the tables of the MySQL database accordingly so that ISPs come up in the last column?

u_u; I should probably sit down and really start learning this spring break.
 
I'm pretty sure enough members can help you with this, i however can't. I'm busy with my exams ( ;l )
1. You should find the right area to add new code / change
2. Don't forget to add another ,'$isp' at the end of the register query
3. Update the isp at login
4. at your mysql table index click structure next to the users table
5. click add a new row or something like that and call it isp (varchar 255)

U should keep those things in mind :)
 
Well, remember that spammers are not identified by their ISP (or country). Even worse, if they're just bots they'll appear as totally normal users with standard ISPs.

It is considered as an error to handle spammers by IP or ISP. You should use more powerful tools like login limitations or traps on your registration pages.

One simple trick is to use this html in registration page:

<div id="countermeasure"><label for="email_"></label><input type="text" name="email_" /></div>
<script type="text/javascript">document.getElementById('countermeasure').style.display = 'none';</script>

After that simply check if your user is a bot:
<?php $is_a_bot = !empty($_POST['email_']); ?>

The trick behind this is simple: for a normal user the field will be hidden and therefore they won't fill anything into it, a bot will fill in the field and you can detect it by the caused error and kick it or send it to fake pages.

NOTE: This sometimes causes small errors with the autocomplete feature of browsers, you should handle it by adding autocomplete="off" to your form.

--------------------

If the spammers are human idiots who just want to bother you you can IP ban them and send them cookies that will detect if they changed IPs. But ISP blocking them would be insane, blocking millions of ISP clients because of one idiot would be a extreme measure.

--------------------

Adding a country-wide block is just as bad as an ISP block. It would just help if you had legal restrictions in that country and would need to avoid people visiting the site.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,119
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Top