hugzzz Posted April 17, 2008 Share Posted April 17, 2008 Hello, I'm currently developing my site and want to ask some questions : 1 - Users post articles that can be purchased , I want to let the buyer read it without being able to copy it ... article will not be in English , can I make a pic of this article using GD library or so to let him read and not to copy ? if yes , how please ? if no , is there any other means ? 2 - I want to make it secure , there is an Admin panel that I want to protect , members area and other attacks ... can you advice me on how to build them securely please ? 3 - some basic questions on MySQL : 3-1 : If I have 100,000 records , I searched for records with ID = 5 , let's assume there are 100 of them , how much time will that takes ? 3-2 : If I have a field that takes three options ( accept , refuse , on hold ) , can I set it to varchar ? 3-3 : INT length of 3 , how long numbers can be ? Link to comment https://forums.phpfreaks.com/topic/101472-developing-my-site-basic-questions-please/ Share on other sites More sharing options...
marcus Posted April 17, 2008 Share Posted April 17, 2008 1. I don't suggest using that method, just show a brief part of it. 2. Just protect the folder of the admin panel with a username or password 3-1. Depends on how fast your mySQL server is, could be .05 seconds or could be 5 seconds 3-2. Yes, you should just set it to an INT 1, option 1 = accept, option 2 = refuse, option 3 = on hold 3-3. INT(3) = 000-999 Link to comment https://forums.phpfreaks.com/topic/101472-developing-my-site-basic-questions-please/#findComment-519068 Share on other sites More sharing options...
hugzzz Posted April 17, 2008 Author Share Posted April 17, 2008 another question : If I want to prevent a user from registering again after banning him , how to decide if he is trying to register again ? ( comparing address infos for example , and if it's not in English ? ) Link to comment https://forums.phpfreaks.com/topic/101472-developing-my-site-basic-questions-please/#findComment-519076 Share on other sites More sharing options...
hugzzz Posted April 17, 2008 Author Share Posted April 17, 2008 thank you mgallforever , but I don't think a buyer will buy an article if he can't read it all . what do u think !? and please , do you have a good tutorial on how to protect admin panel using sessions and cookies ?! again ,Thanks alot Link to comment https://forums.phpfreaks.com/topic/101472-developing-my-site-basic-questions-please/#findComment-519079 Share on other sites More sharing options...
marcus Posted April 17, 2008 Share Posted April 17, 2008 Compare IPs. Link to comment https://forums.phpfreaks.com/topic/101472-developing-my-site-basic-questions-please/#findComment-519080 Share on other sites More sharing options...
jonsjava Posted April 17, 2008 Share Posted April 17, 2008 Compare IPs Won't work on anybody but Static IP addresses. Link to comment https://forums.phpfreaks.com/topic/101472-developing-my-site-basic-questions-please/#findComment-519083 Share on other sites More sharing options...
hugzzz Posted April 17, 2008 Author Share Posted April 17, 2008 Compare IPs. I'm afraid this will not work ,, he might not using a static IP when registering again after 3 weeks or so , or just registering from anywhere else . Link to comment https://forums.phpfreaks.com/topic/101472-developing-my-site-basic-questions-please/#findComment-519084 Share on other sites More sharing options...
jonsjava Posted April 17, 2008 Share Posted April 17, 2008 better solution: create a field on the user table that is to track if they are banned: ALTER TABLE ADD `banned`INT(1) NOT NULL DEFAULT VALUE='0'; if you ban someone, you just have the script change thier banned value to 1, and add a check to the login that says .... AND `banned` != 1; Link to comment https://forums.phpfreaks.com/topic/101472-developing-my-site-basic-questions-please/#findComment-519086 Share on other sites More sharing options...
hugzzz Posted April 17, 2008 Author Share Posted April 17, 2008 better solution: create a field on the user table that is to track if they are banned: ALTER TABLE ADD `banned`INT(1) NOT NULL DEFAULT VALUE='0'; if you ban someone, you just have the script change thier banned value to 1, and add a check to the login that says .... AND `banned` != 1; This is good but will only work if users register with their ID's or Credit Cards that must be unique for every person ,, but problem is , he can make another account with another email in 3 minutes and cheat me .. so , I assume real address , name will be unique ( he should enter them so, or he won't be able to receive article payment ) ... so , I want to compare them ( knowing that he can add a letter , remove one ,, changing alittle in the address , so , if he is smart , his provided addresses will not be identical ) Link to comment https://forums.phpfreaks.com/topic/101472-developing-my-site-basic-questions-please/#findComment-519089 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.