close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Stop people from a certain domain registering

Thread began 11/22/2010 10:01 am by mousework50137 | Last modified 11/29/2010 6:57 am by Jason Byrnes | 2214 views | 8 replies |

mousework50137

Stop people from a certain domain registering

Hi
My original powerstore 1 site is having problems.
It's a Drugs Recognition trainers site who is closely associated with the police.

We have a nuisance register, who is repeatedly registering using various email addresses from the same domain name and sending nonsence emails through the contact form.

Lets say
steve@xyz.com
mickey@xyz.com
then
user@xyz.com

We wish to stop people from this domain registering, and sending emails through the contact form, is this possible?

I have all the extensions to hand.

Cheers
Mark

Sign in to reply to this post

Jason ByrnesWebAssist

put this code at line 1:

php:
<?

if(isset($_POST['UserEmail']) && $_POST['UserEmail'] != "") {
    $emailArray = explode("@", $_POST['UserEmail']);
    if($emailArray[1] == "xyz.com"){
        header("location: ".$_SERVER['PHP_SELF']."?dom=no");
        
    }
}
?>




this will not allow the domain xyz.com to register.

Sign in to reply to this post

mousework50137

Hello Jason,
thanks for this,
Do I do this on users_Registration.php and the contactus.php pages.
Best

Sign in to reply to this post

Jason ByrnesWebAssist

users registration page.

you can do the same thing on the contact page, but you will need to edit the code slightly.


on the contact page, the email element is named:
Email_address


so change:
$_POST['UserEmail']

to:
$_POST['Email_address']

Sign in to reply to this post

mousework50137

Hi again,
I've tried doing the suggested on the registration page but if I go to the site,
www.blueknightlearning.com I can still register.

I tested by trying to register as mark@narod.ru and it still let me register.
Code I pasted in and altered is below, and file attached.
Thanks for your help in this!


<?
if(isset($_POST['UserEmail']) && $_POST['UserEmail'] != "") {
$emailArray = explode("@", $_POST['UserEmail']);
if($emailArray[1] == "narod.ru"){
header("location: ".$_SERVER['PHP_SELF']."?dom=no");

}
}
?>
<?php require_once( "WA_Globals/WA_Globals.php" ); ?>
<?php require_once('Connections/localhost.php'); ?><?php
//WA eCart Include
require_once("WA_eCart/WA_Store_Cart_PHP.php");
?>
<?php
$WA_Store_Cart->GetContent();
?>
<?php require_once("WA_Universal_Email/mail_PHP.php"); ?>
<?php require_once("WA_Universal_Email/MailFormatting_PHP.php"); ?>
<?php
require_once("WA_SecurityAssist/WA_RandomPassword.php");
?>
<?php require_once("WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>

Attached Files
users_Registration.php.zip
Sign in to reply to this post

mousework50137

I am a wally - It does work!!!

Hi
My mistake, forgot to clear my browser cache.
It does work, stops them registering,

Thank you so much
Keep up the good work,
Best
Mark

Sign in to reply to this post

Jason ByrnesWebAssist

ok, glad to hear it is working.

Sign in to reply to this post

mousework50137

add a second blocked domain

Hello again,
the method you kindly outlined earlier in the week has worked fine, unfortunately they've started using another domain to cause mayhem.
How do I add a second domain to the method to block that.
thanks
mark

Sign in to reply to this post

Jason ByrnesWebAssist

you can add more domains to the if statement like so:

php:
if($emailArray[1] == "narod.ru" || $emailArray[1] == "other.com"){
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...