ahmed nasr Posted February 26, 2010 Share Posted February 26, 2010 hi how can i make anybody can make only one registration with his ip ? i mean a lot of people sign up with two or three accounts ? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 26, 2010 Share Posted February 26, 2010 (edited) I must be in a good mood today. Create and name a file called clientipcheck.php and save the below code in it. Upload it to your whmcs/includes/hooks directory. function checkIPIsValid($vars) { if ($_SERVER['PHP_SELF'] == '/cart.php') { global $errormessage,$remote_ip; $result = select_query("tblclients","ip",array("ip"=>$remote_ip)); while ($row = mysql_fetch_array($result)) { if ($remote_ip = $row["ip"]) { $errormessage .= "<li>Your IP has already been used to register an account, please login to that account to place your order."; } } } } add_hook("ClientDetailsValidation",0,"checkIPIsValid",""); Edited February 26, 2010 by sparky 0 Quote Link to comment Share on other sites More sharing options...
vincent1 Posted February 26, 2010 Share Posted February 26, 2010 Your good mood has been worth it sparky, as because of it, I am adding you to my special contacts list for future design work. - Vince 0 Quote Link to comment Share on other sites More sharing options...
ahmed nasr Posted February 26, 2010 Author Share Posted February 26, 2010 cheers bro i'm gonna add ya too sparky 0 Quote Link to comment Share on other sites More sharing options...
ahmed nasr Posted February 26, 2010 Author Share Posted February 26, 2010 i'm done ! shall i be comfortable now ?? or is there anything else i have to do ? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 26, 2010 Share Posted February 26, 2010 That should help to reduce the bulk of your duplicates... remember the client would also have a dynamic IP and it could change from the one recorded. Keep an eye on it and see how it goes. 0 Quote Link to comment Share on other sites More sharing options...
ahmed nasr Posted February 26, 2010 Author Share Posted February 26, 2010 i did as wt u told me but it showed me that code in header of my site 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 26, 2010 Share Posted February 26, 2010 Don't forget the php tags <?php code here ?> 0 Quote Link to comment Share on other sites More sharing options...
ahmed nasr Posted February 28, 2010 Author Share Posted February 28, 2010 i did it i hope it success 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.